@Test
public void testProperties()
        throws URISyntaxException, IOException, SAXException, ParserConfigurationException, ConfigurationException {

    Mockito.when(propertiesValidator1.validate(Mockito.any())).thenReturn(Collections.singleton(new ValidationMessage(ValidationMessageSeverity.ERROR, "error1")));
    Mockito.when(propertiesValidator2.validate(Mockito.any())).thenReturn(null);
    PackageProperties properties;
    try (InputStream input = this.getClass().getResourceAsStream("/simple-package/META-INF/vault/properties.xml");
            InputStream input2 = this.getClass().getResourceAsStream("/simple-package/META-INF/vault/properties.xml")) {
        Collection<ValidationMessage> messages = validator.validateMetaInfData(input, Paths.get("vault/properties.xml"));
        ValidationExecutorTest.assertViolation(messages,
                new ValidationViolation("id1", ValidationMessageSeverity.ERROR, "error1"));
        properties = DefaultPackageProperties.fromInputStream(input2);
        Mockito.verify(propertiesValidator1).validate(properties);
    }
}