@Test public void givenConstructorWithCorrectSchemaThenValidateJsonOK() throws Exception { CachedArchiveUnitProfileLoader archiveUnitProfileLoader = mock(CachedArchiveUnitProfileLoader.class); CachedSchemaValidatorLoader schemaValidatorLoader = mock(CachedSchemaValidatorLoader.class); UnitValidator unitValidator = new UnitValidator(archiveUnitProfileLoader, schemaValidatorLoader); ObjectNode unitJson = (ObjectNode) JsonHandler.getFromInputStream( PropertiesUtils.getResourceAsStream(AU_JSON_FILE)).get(TAG_ARCHIVE_UNIT); unitValidator.validateUnit(unitJson); }
public void validateUnit(ObjectNode unitJson) throws MetadataValidationException { validateStartAndEndDates(unitJson); validateInternalSchema(unitJson); validateArchiveUnitProfile(unitJson); }
UnitValidator { public void validateUnit(ObjectNode unitJson) throws MetadataValidationException { validateStartAndEndDates(unitJson); validateInternalSchema(unitJson); validateArchiveUnitProfile(unitJson); } }
UnitValidator { public void validateUnit(ObjectNode unitJson) throws MetadataValidationException { validateStartAndEndDates(unitJson); validateInternalSchema(unitJson); validateArchiveUnitProfile(unitJson); } UnitValidator(CachedArchiveUnitProfileLoader archiveUnitProfileLoader,
        CachedSchemaValidatorLoader schemaValidatorLoader); }
UnitValidator { public void validateUnit(ObjectNode unitJson) throws MetadataValidationException { validateStartAndEndDates(unitJson); validateInternalSchema(unitJson); validateArchiveUnitProfile(unitJson); } UnitValidator(CachedArchiveUnitProfileLoader archiveUnitProfileLoader,
        CachedSchemaValidatorLoader schemaValidatorLoader); void validateUnit(ObjectNode unitJson); void validateInternalSchema(ObjectNode archiveUnit); void validateArchiveUnitProfile(ObjectNode archiveUnit); void validateStartAndEndDates(JsonNode archiveUnit); }
UnitValidator { public void validateUnit(ObjectNode unitJson) throws MetadataValidationException { validateStartAndEndDates(unitJson); validateInternalSchema(unitJson); validateArchiveUnitProfile(unitJson); } UnitValidator(CachedArchiveUnitProfileLoader archiveUnitProfileLoader,
        CachedSchemaValidatorLoader schemaValidatorLoader); void validateUnit(ObjectNode unitJson); void validateInternalSchema(ObjectNode archiveUnit); void validateArchiveUnitProfile(ObjectNode archiveUnit); void validateStartAndEndDates(JsonNode archiveUnit);  }