}\r
\r
@Test\r
- void putServiceWhenIoException_shouldThrowExceptionAndNoServiceCreated() throws Exception {\r
+ void putServiceWhenIoExceptionAddingHeader_shouldThrowExceptionAndNoServiceCreated() throws Exception {\r
ServicesApiDelegateImpl delegateUnderTest = new ServicesApiDelegateImpl(webRequestMock);\r
\r
whenGetRequestUrlThenReturnUrl();\r
delegateUnderTest.putIndividualService(SERVICE_NAME, service);\r
});\r
\r
- assertThat(exception.getMessage()).isEqualTo("Unable to set header Location in response. Cause: Error");\r
+ assertThat(exception.getMessage())\r
+ .isEqualTo("Unable to set header Location in put response for service " + SERVICE_NAME + ". Cause: Error");\r
\r
ResponseEntity<List<Service>> response = delegateUnderTest.getServices();\r
assertThat(response.getBody()).isEmpty();\r
assertThat(services).hasSize(2);\r
List<String> expectedServiceNames = Arrays.asList(serviceName1, serviceName2);\r
assertThat(expectedServiceNames).contains(services.get(0).getName()) //\r
- .contains(services.get(1).getName());\r
+ .contains(services.get(1).getName());\r
}\r
\r
@Test\r