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=803d48989d7824309602393763142320cdbbc0d2;hp=c19e1de27ba03116ee9904cd281325ade506f204;hpb=8489de0f43f28c5cd62206b4e242c0308f9864b9;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