@@ -118,12 +118,12 @@ public void testPutRequest_json_success() throws IOException, InterruptedExcepti
118118 testWorker .putRequest (WorkRequest .getDefaultInstance ());
119119
120120 OutputStream stdout = testWorker .getFakeSubprocess ().getOutputStream ();
121- assertThat (stdout .toString ()).isEqualTo ("{}" );
121+ assertThat (stdout .toString ()).isEqualTo ("{}" + System . lineSeparator () );
122122 }
123123
124124 @ Test
125125 public void testGetResponse_json_success () throws IOException , InterruptedException {
126- TestWorker testWorker = createTestWorker ("{}" .getBytes (UTF_8 ), JSON );
126+ TestWorker testWorker = createTestWorker (( "{}" + System . lineSeparator ()) .getBytes (UTF_8 ), JSON );
127127 WorkResponse readResponse = testWorker .getResponse (0 );
128128 WorkResponse response = WorkResponse .getDefaultInstance ();
129129
@@ -151,7 +151,8 @@ public void testPutRequest_json_populatedFields_success()
151151 OutputStream stdout = testWorker .getFakeSubprocess ().getOutputStream ();
152152 String requestJsonString =
153153 "{\" arguments\" :[\" testRequest\" ],\" inputs\" :"
154- + "[{\" path\" :\" testPath\" ,\" digest\" :\" dGVzdERpZ2VzdA==\" }],\" requestId\" :1,\" verbosity\" :11}" ;
154+ + "[{\" path\" :\" testPath\" ,\" digest\" :\" dGVzdERpZ2VzdA==\" }],\" requestId\" :1,\" verbosity\" :11}"
155+ + System .lineSeparator ();
155156 assertThat (stdout .toString ()).isEqualTo (requestJsonString );
156157 }
157158
@@ -170,7 +171,8 @@ public void testGetResponse_json_populatedFields_success()
170171
171172 private void verifyGetResponseFailure (String responseString , String expectedError )
172173 throws IOException {
173- TestWorker testWorker = createTestWorker (responseString .getBytes (UTF_8 ), JSON );
174+ TestWorker testWorker =
175+ createTestWorker ((responseString + System .lineSeparator ()).getBytes (UTF_8 ), JSON );
174176 IOException ex = assertThrows (IOException .class , () -> testWorker .getResponse (0 ));
175177 assertThat (ex ).hasMessageThat ().contains (expectedError );
176178 }
0 commit comments