@Test public void testInvalidStatus() { response.setStatus(null); expectFailure(INVALID_STATUS_IN_RESPONSE); }
/** * @return a sample response. */ public static Response createResponse() { Response response = new Response(); response.setStatus(Status.FAILURE); response.getErrors().addAll(Arrays.asList( new ErrorInfo(ErrorCode.PATIENT_ID_DOES_NOT_MATCH, "context1", Severity.ERROR, "location1", null), new ErrorInfo(ErrorCode.SQL_ERROR, "context2", Severity.WARNING, null, null), new ErrorInfo(ErrorCode._USER_DEFINED, "context3", Severity.ERROR, "location3", "MyCustomErrorCode"))); return response; }