@@ -96,23 +96,25 @@ void getLastChangeEventWhenEventHasBeenPublishedReturnsPublishedState() {
9696 @ Test
9797 void stateChangesAreLogged (CapturedOutput output ) {
9898 AvailabilityChangeEvent .publish (this .context , LivenessState .CORRECT );
99- assertThat (output ).contains ("Application availability state LivenessState changed to CORRECT\n " );
99+ assertThat (output )
100+ .contains ("Application availability state LivenessState changed to CORRECT" + System .lineSeparator ());
100101 AvailabilityChangeEvent .publish (this .context , LivenessState .BROKEN );
101- assertThat (output ).contains ("Application availability state LivenessState changed from CORRECT to BROKEN\n " );
102+ assertThat (output ).contains (
103+ "Application availability state LivenessState changed from CORRECT to BROKEN" + System .lineSeparator ());
102104 }
103105
104106 @ Test
105107 void stateChangesAreLoggedWithExceptionSource (CapturedOutput output ) {
106108 AvailabilityChangeEvent .publish (this .context , new IOException ("connection error" ), LivenessState .BROKEN );
107109 assertThat (output ).contains ("Application availability state LivenessState changed to BROKEN: "
108- + "java.io.IOException: connection error\n " );
110+ + "java.io.IOException: connection error" + System . lineSeparator () );
109111 }
110112
111113 @ Test
112114 void stateChangesAreLoggedWithOtherSource (CapturedOutput output ) {
113115 AvailabilityChangeEvent .publish (this .context , new CustomEventSource (), LivenessState .BROKEN );
114116 assertThat (output ).contains ("Application availability state LivenessState changed to BROKEN: "
115- + CustomEventSource .class .getName () + " \n " );
117+ + CustomEventSource .class .getName () + System . lineSeparator () );
116118 }
117119
118120 enum TestState implements AvailabilityState {
0 commit comments