@Test
public void testDeleteStatements() throws MediaWikiApiErrorException, IOException {

	String guid1 = "8372EF7A-B72C-7DE2-98D0-DFB4-8EC8392AC28E";
	String guid2 = "4311895D-9091-4BC9-9B34-DFB4-1B00EE8CFA62";
	WikibaseDataEditor wde = new WikibaseDataEditor(this.con, Datamodel.SITE_WIKIDATA);
	ItemIdValue id = Datamodel.makeWikidataItemIdValue("Q1234");
	Statement s1 = StatementBuilder.forSubjectAndProperty(id, P31)
			.withValue(Q5).withId("Q1234$"+guid1).build();
	Statement s2 = StatementBuilder.forSubjectAndProperty(id, P31)
			.withValue(Q5).withId("Q1234$"+guid2).build();
	ItemDocument itemDocument = ItemDocumentBuilder.forItemId(id)
			.withRevisionId(1234)
			.withStatement(s1)
			.withStatement(s2)
			.build();
	ItemDocument expectedDocument = ItemDocumentBuilder.forItemId(id)
			.withRevisionId(1235)
			.build();
	
	List<String> statementIds = Arrays.asList("Q1234$"+guid1, "Q1234$"+guid2);
	
	String statementsList = String.join("|", statementIds);
	Map<String, String> params = new HashMap<>();
	params.put("action", "wbremoveclaims");
	params.put("summary", "Removing claims");
	params.put("token", "42307b93c79b0cb558d2dfb4c3c92e0955e06041+\\");
	params.put("format", "json");
	params.put("baserevid", "1234");
	params.put("maxlag", "5");
	params.put("claim", statementsList);
	String expectedResult = "{\"pageinfo\":{\"lastrevid\":1235},\"success\":1,\"claims\":[\""+statementIds.get(0)+"\",\""+statementIds.get(1)+"\"]}";
	con.setWebResource(params, expectedResult);
	ItemDocument editedDocument = wde.updateTermsStatements(itemDocument, Collections.<MonolingualTextValue>emptyList(),
			Collections.<MonolingualTextValue>emptyList(), Collections.<MonolingualTextValue>emptyList(),
			Collections.<MonolingualTextValue>emptyList(), Collections.<Statement>emptyList(),
			Arrays.asList(s1,s2), "Removing claims", null);
	assertEquals(expectedDocument, editedDocument);
}