### Question:
NamingClientResponseValidator { public String validateNameGenDeleteResponse(ResponseEntity<NameGenDeleteResponse> response) throws BadResponseException { if (response == null) { logger.error(LoggingAnchor.FIVE, MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE, "BPMN", ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_NAMING_SERVICE); throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE); } int responseCode = response.getStatusCodeValue(); String responseMessage = ""; NameGenDeleteResponse responseBody = response.getBody(); if (responseBody == null) { logger.error(LoggingAnchor.FIVE, MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE, "BPMN", ErrorCode.UnknownError.getValue(), NULL_RESPONSE_FROM_NAMING_SERVICE); throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE); } if (isHttpCodeSuccess(responseCode)) { logger.info("Successful Response from Naming Service"); return responseMessage; } else { String errorMessageString = NAMING_SERVICE_ERROR; String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString); logger.error(LoggingAnchor.FIVE, MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN", ErrorCode.DataError.getValue(), errorMessage); throw new BadResponseException(errorMessage); } }  String validateNameGenResponse(ResponseEntity<NameGenResponse> response); String validateNameGenDeleteResponse(ResponseEntity<NameGenDeleteResponse> response);  }### Answer:
@Test public void validateNameGenDeleteResponseSuccessTest() throws BadResponseException { NameGenDeleteResponse name = new NameGenDeleteResponse(); ResponseEntity<NameGenDeleteResponse> resp = new ResponseEntity<>(name, null, HttpStatus.OK); String actual = responseValidator.validateNameGenDeleteResponse(resp); assertEquals(actual, ""); }
@Test public void validateNameGenDeleteResponseBadStatusTest() throws BadResponseException { NameGenDeleteResponse name = new NameGenDeleteResponse(); ResponseEntity<NameGenDeleteResponse> resp = new ResponseEntity<>(name, null, HttpStatus.NOT_FOUND); expectedException.expect(BadResponseException.class); responseValidator.validateNameGenDeleteResponse(resp); }