diff --git a/src/test/java/com/commercetools/project/sync/state/StateSyncerTest.java b/src/test/java/com/commercetools/project/sync/state/StateSyncerTest.java index f940594f..b99b9922 100644 --- a/src/test/java/com/commercetools/project/sync/state/StateSyncerTest.java +++ b/src/test/java/com/commercetools/project/sync/state/StateSyncerTest.java @@ -108,7 +108,7 @@ void getQuery_ShouldBuildStateQuery() { } @Test - void syncWithError_WhenNoKeyIsProvided_ShouldContinueAndLogError() { + void transform_WhenNoKeyIsProvided_ShouldContinueAndLogError() { // preparation final ProjectApiRoot sourceClient = mock(ProjectApiRoot.class); final List stateTypePage = @@ -125,12 +125,9 @@ void syncWithError_WhenNoKeyIsProvided_ShouldContinueAndLogError() { assertThat(syncerTestLogger.getAllLoggingEvents()) .anySatisfy( loggingEvent -> { - assertThat(loggingEvent.getMessage()) - .contains( - NullPointerException.class.getCanonicalName() - + ": StateDraft: key is missing"); + assertThat(loggingEvent.getMessage()).contains("StateDraft: key is missing"); assertThat(loggingEvent.getThrowable().isPresent()).isTrue(); - assertThat(loggingEvent.getThrowable().get().getCause().getCause()) + assertThat(loggingEvent.getThrowable().get()) .isInstanceOf(NullPointerException.class); }); }