### Question:
TypeRefValidator extends SimpleDMNValidator { @Override public List<String> validate(DMNModelRepository dmnModelRepository) { if (dmnModelRepository == null) { throw new IllegalArgumentException("Missing definitions"); } List<Pair<TDRGElement, Type>> errorReport = makeErrorReport(dmnModelRepository); return errorReport.stream().map(p -> makeError(p, dmnModelRepository)).collect(Collectors.toList()); } TypeRefValidator();  TypeRefValidator(BuildLogger logger);  TypeRefValidator(DMNDialectDefinition<?, ?, ?, ?, ?, ?> dmnDialectDefinition); @Override List<String> validate(DMNModelRepository dmnModelRepository); List<Pair<TDRGElement, Type>> makeErrorReport(DMNModelRepository dmnModelRepository);  }### Answer:
@Test public void testValidateWhenCorrect() { List<String> expectedErrors = Arrays.asList(); validate(validator, "tck/cl3/input/0020-vacation-days.dmn", expectedErrors); }
@Test public void validate() { List<String> expectedErrors = Arrays.asList( "Error:(label='Applicant', name='applicant', id='id-d2376567fde3c9400ee327ecec21e36d') Cannot find typeRef 'QualifiedName(null, applicant)'" ); validate(validator, "dmn/input/test-dmn-with-missing-type-ref.dmn", expectedErrors); }
@Test(expected = IllegalArgumentException.class) public void testValidateDefinitionsWhenNull() { validator.validate(null); }