Merge "Adapted test scripts to changes in PMS 2.0"
[nonrtric.git] / r-app-catalogue / src / test / java / org / oransc / rappcatalogue / api / GeneralRappCatalogueControllerAdvisorTest.java
index 1c4d414..24afa09 100644 (file)
@@ -64,13 +64,15 @@ class GeneralRappCatalogueControllerAdvisorTest {
     void handleHeaderException_shouldReturnInternalServerErrorWithMessage() {
         GeneralRappCatalogueControllerAdvisor advisorUnderTest = new GeneralRappCatalogueControllerAdvisor();
 
-        HeaderException exception = new HeaderException("Header", new Exception("Cause"));
+        String serviceName = "Service";
+        HeaderException exception = new HeaderException("Header", serviceName, new Exception("Cause"));
 
         ResponseEntity<Object> response = advisorUnderTest.handleHeaderException(exception);
 
         assertThat(response.getStatusCode()).isEqualTo(INTERNAL_SERVER_ERROR);
         ErrorInformation body = (ErrorInformation) response.getBody();
         assertThat(body.getStatus()).isEqualTo(INTERNAL_SERVER_ERROR.value());
-        assertThat(body.getDetail()).isEqualTo("Unable to set header Header in response. Cause: Cause");
+        assertThat(body.getDetail())
+            .isEqualTo("Unable to set header Header in put response for service " + serviceName + ". Cause: Cause");
     }
 }