X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=r-app-catalogue%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Frappcatalogue%2Fapi%2FServicesApiDelegateImplTest.java;h=f2f30ff6776560aec2da9bf977de48cd9c4230e3;hb=bfe1c4049297589c4ade863b12e3d6a6cb7abc99;hp=c19e1de27ba03116ee9904cd281325ade506f204;hpb=2d7ba05327959f5381f96fd885b3b82789d8936c;p=nonrtric.git diff --git a/r-app-catalogue/src/test/java/org/oransc/rappcatalogue/api/ServicesApiDelegateImplTest.java b/r-app-catalogue/src/test/java/org/oransc/rappcatalogue/api/ServicesApiDelegateImplTest.java index c19e1de2..f2f30ff6 100644 --- a/r-app-catalogue/src/test/java/org/oransc/rappcatalogue/api/ServicesApiDelegateImplTest.java +++ b/r-app-catalogue/src/test/java/org/oransc/rappcatalogue/api/ServicesApiDelegateImplTest.java @@ -155,7 +155,7 @@ class ServicesApiDelegateImplTest { } @Test - void putServiceWhenIoException_shouldThrowExceptionAndNoServiceCreated() throws Exception { + void putServiceWhenIoExceptionAddingHeader_shouldThrowExceptionAndNoServiceCreated() throws Exception { ServicesApiDelegateImpl delegateUnderTest = new ServicesApiDelegateImpl(webRequestMock); whenGetRequestUrlThenReturnUrl(); @@ -172,7 +172,8 @@ class ServicesApiDelegateImplTest { delegateUnderTest.putIndividualService(SERVICE_NAME, service); }); - assertThat(exception.getMessage()).isEqualTo("Unable to set header Location in response. Cause: Error"); + assertThat(exception.getMessage()) + .isEqualTo("Unable to set header Location in put response for service " + SERVICE_NAME + ". Cause: Error"); ResponseEntity> response = delegateUnderTest.getServices(); assertThat(response.getBody()).isEmpty(); @@ -206,7 +207,7 @@ class ServicesApiDelegateImplTest { assertThat(services).hasSize(2); List expectedServiceNames = Arrays.asList(serviceName1, serviceName2); assertThat(expectedServiceNames).contains(services.get(0).getName()) // - .contains(services.get(1).getName()); + .contains(services.get(1).getName()); } @Test