@@ -96,23 +96,25 @@ void getLastChangeEventWhenEventHasBeenPublishedReturnsPublishedState() {
96
96
@ Test
97
97
void stateChangesAreLogged (CapturedOutput output ) {
98
98
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 ());
100
101
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 ());
102
104
}
103
105
104
106
@ Test
105
107
void stateChangesAreLoggedWithExceptionSource (CapturedOutput output ) {
106
108
AvailabilityChangeEvent .publish (this .context , new IOException ("connection error" ), LivenessState .BROKEN );
107
109
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 () );
109
111
}
110
112
111
113
@ Test
112
114
void stateChangesAreLoggedWithOtherSource (CapturedOutput output ) {
113
115
AvailabilityChangeEvent .publish (this .context , new CustomEventSource (), LivenessState .BROKEN );
114
116
assertThat (output ).contains ("Application availability state LivenessState changed to BROKEN: "
115
- + CustomEventSource .class .getName () + " \n " );
117
+ + CustomEventSource .class .getName () + System . lineSeparator () );
116
118
}
117
119
118
120
enum TestState implements AvailabilityState {
0 commit comments