@Test
public void getAllDataPropertiesTest() throws Exception {

    // Setup:
    Set<String> expectedProps = Stream.of("http://test.com/ontology1#testDataProperty1", "http://test.com/ontology1#testDataProperty2").collect(Collectors.toSet());
    Set<DataProperty> properties = ontology.getAllDataProperties();
    assertEquals(expectedProps.size(), properties.size());
    properties.stream()
            .map(property -> property.getIRI().stringValue())
            .forEach(iri -> assertTrue(expectedProps.contains(iri)));
}