### Question:
ConceptDrugValidator implements Validator { @Override public void validate(Object obj, Errors errors) throws IllegalArgumentException { if (obj == null || !(obj instanceof Drug)) { throw new IllegalArgumentException("The parameter obj should not be null and must be of type" + Drug.class); } log.debug("request to validate drug having concept: " + ((Drug) obj).getConcept()); ValidationUtils.rejectIfEmpty(errors, "concept", "ConceptDrug.error.conceptRequired"); }  @Override boolean supports(Class<?> c); @Override void validate(Object obj, Errors errors);  }### Answer:
@Test public void validate_shouldFailIfAConceptIsNotSpecified() { Drug drug = new Drug(); Errors errors = new BindException(drug, "drug"); new ConceptDrugValidator().validate(drug, errors); Assert.assertTrue(errors.hasErrors()); }