### Question:
RestUtils { public static Response getStatusResponse(Response.Status status, String... messages) { if (status == null) { return Response.status(Response.Status.BAD_REQUEST).build(); } String msg = StringUtils.join(messages, ". "); if (StringUtils.isBlank(msg)) { msg = status.getReasonPhrase(); } try { return GenericExceptionMapper.getExceptionResponse(status.getStatusCode(), msg); } catch (Exception ex) { logger.error(null, ex); return Response.status(Response.Status.BAD_REQUEST).build(); } } private  RestUtils(); static String extractAccessKey(HttpServletRequest request); static boolean isAnonymousRequest(HttpServletRequest request); static String extractDate(HttpServletRequest request); static String extractResourcePath(HttpServletRequest request); static ParaObject readResourcePath(String appid, String path); static Response getEntity(InputStream is, Class<?> type); static byte[] readEntityBytes(InputStream in); static Response getVotingResponse(ParaObject object, Map<String, Object> entity); static Response getReadResponse(App app, ParaObject content); static Response getCreateResponse(App app, String type, InputStream is); static Response getOverwriteResponse(App app, String id, String type, InputStream is); static Response getUpdateResponse(App app, ParaObject object, InputStream is); static Response getDeleteResponse(App app, ParaObject content); static Response getBatchReadResponse(App app, List<String> ids); static Response getBatchCreateResponse(final App app, InputStream is); static Response getBatchUpdateResponse(App app, Map<String, ParaObject> oldObjects,
			List<Map<String, Object>> newProperties); static Response getBatchDeleteResponse(App app, List<String> ids); static Response readLinksHandler(ParaObject pobj, String id2, String type2,
			MultivaluedMap<String, String> params, Pager pager, boolean childrenOnly); static Response deleteLinksHandler(ParaObject pobj, String id2, String type2, boolean childrenOnly); static Response createLinksHandler(ParaObject pobj, String id2); static Pager getPagerFromParams(MultivaluedMap<String, String> params); static Response getStatusResponse(Response.Status status, String... messages); static void returnStatusResponse(HttpServletResponse response, int status, String message); static void returnObjectResponse(HttpServletResponse response, Object obj); static String pathParam(String param, ContainerRequestContext ctx); static List<String> pathParams(String param, ContainerRequestContext ctx); static String queryParam(String param, ContainerRequestContext ctx); static List<String> queryParams(String param, ContainerRequestContext ctx); static boolean hasQueryParam(String param, ContainerRequestContext ctx);  }### Answer:
@Test public void testGetJSONResponse() { assertEquals(Status.BAD_REQUEST.getStatusCode(), getStatusResponse(null).getStatus()); assertEquals(Status.OK.getStatusCode(), getStatusResponse(Status.OK).getStatus()); }