@Test
public void testPropertyFilterForItem() {

	ItemIdValue s = Datamodel.makeWikidataItemIdValue("Q42");
	PropertyIdValue p1 = Datamodel.makeWikidataPropertyIdValue("P1");
	PropertyIdValue p2 = Datamodel.makeWikidataPropertyIdValue("P2");
	PropertyIdValue p3 = Datamodel.makeWikidataPropertyIdValue("P3");
	PropertyIdValue p4 = Datamodel.makeWikidataPropertyIdValue("P4");
	Set<PropertyIdValue> propertyFilter = new HashSet<>();
	propertyFilter.add(p1);
	propertyFilter.add(p3);
	DocumentDataFilter documentDataFilter = new DocumentDataFilter();
	documentDataFilter.setPropertyFilter(propertyFilter);
	DatamodelFilter filter = new DatamodelFilter(new DataObjectFactoryImpl(), documentDataFilter);
	ItemDocument itemDocument = Datamodel.makeItemDocument(
			s,
			Collections.emptyList(),
			Collections.emptyList(),
			Collections.emptyList(),
			Arrays.asList(
					makeTestStatementGroup(p1, s),
					makeTestStatementGroup(p2, s),
					makeTestStatementGroup(p3, s),
					makeTestStatementGroup(p4, s)
			),
			Collections.emptyMap()
	);
	ItemDocument itemDocumentFiltered = Datamodel.makeItemDocument(
			s,
			Collections.emptyList(),
			Collections.emptyList(),
			Collections.emptyList(),
			Arrays.asList(
					makeTestStatementGroup(p1, s),
					makeTestStatementGroup(p3, s)
			),
			Collections.emptyMap()
	);
	assertEquals(itemDocumentFiltered, filter.filter(itemDocument));
}