### Question:
TimeSchema extends NeutralSchema { protected boolean validate(String fieldName, Object entity, List<ValidationError> errors, Repository<Entity> repo) { boolean isValid = false; try { javax.xml.bind.DatatypeConverter.parseTime((String) entity); isValid = true; } catch (IllegalArgumentException e2) { isValid = false; } return addError(isValid, fieldName, entity, "RFC 3339", ErrorType.INVALID_DATE_FORMAT, errors); } TimeSchema();  TimeSchema(String xsdType); @Override NeutralSchemaType getSchemaType();  }### Answer:
@Test public void testTimeStringValidation() throws IllegalArgumentException { String timeString = "12:00:00-05:00"; assertTrue("Time entity validation failed", schema.validate(timeString)); }
@Test public void testTimeValidation() { Calendar calendar = Calendar.getInstance(); String timeString = javax.xml.bind.DatatypeConverter.printTime(calendar); assertTrue("Time entity validation failed", schema.validate(timeString)); }
@Test public void testValidationOfStringFailure() { String stringEntity = ""; assertFalse("Expected TimeSchema string validation failure did not succeed", schema.validate(stringEntity)); }