@Test
public void testDeleteAndAdd() {

	// Explicitly deleted statement won't merge
	Reference r1 = ReferenceBuilder.newInstance().withPropertyValue(P1, Q1)
			.build();
	Reference r2 = ReferenceBuilder.newInstance().withPropertyValue(P2, Q2)
			.build();
	Statement s3 = StatementBuilder.forSubjectAndProperty(Q1, P2)
			.withReference(r1).withValue(Q1).withId("ID-s3").build();
	Statement s4 = StatementBuilder.forSubjectAndProperty(Q1, P2)
			.withReference(r2).withValue(Q1).withId("ID-s4").build();
	ItemDocument currentDocument = ItemDocumentBuilder.forItemId(Q1)
			.withStatement(s4).build();
	List<Statement> addStatements = Collections.singletonList(s3);
	List<Statement> deleteStatements = Collections.singletonList(s4);
	StatementUpdate su = new StatementUpdate(currentDocument,
			addStatements, deleteStatements);
	assertTrue(su.toDelete.contains("ID-s4"));
	assertTrue(su.toKeep.containsKey(P2));
	assertEquals(1, su.toKeep.get(P2).size());
	assertEquals(s3, su.toKeep.get(P2).get(0).statement);
	assertFalse(su.isEmptyEdit());
}