### Question:
ResponseBuilder { public static ResponseEntity buildError(Exception exception) { int httpCode = 500; Map<String, Object> map = new HashMap<>(); if (StringUtils.isBlank(exception.getMessage())) { map.put(MESSAGE_KEY, exception.getMessage()); } else { map.put(MESSAGE_KEY, "Internal Error"); } map.put(CODE_KEY, httpCode); map.put(EXCEPTION_KEY, exception.toString()); if (exception instanceof IMSException) { httpCode = NoInventoryExceptions.HTTP_CODE; map.put(CODE_KEY, httpCode); map.put(MESSAGE_KEY, exception.getMessage()); return ResponseEntity.status(httpCode).body(map); } return ResponseEntity.status(httpCode).body(map); } private  ResponseBuilder(); static ResponseEntity build(Object object, int httpCode); static ResponseEntity buildError(Exception exception);  }### Answer:
@Test public void buildError() { Exception exc = new Exception(); ResponseEntity res = ResponseBuilder.buildError(exc); assertNotNull(res); exc = new IMSException("imserr"); res = ResponseBuilder.buildError(exc); assertNotNull(res); }