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

	WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
			Datamodel.SITE_WIKIDATA);
	ItemIdValue id = Datamodel.makeWikidataItemIdValue("Q1234");
	Statement s1 = StatementBuilder.forSubjectAndProperty(id, P31)
			.withValue(Q5).withId("ID-s1").build();
	MonolingualTextValue description = Datamodel.makeMonolingualTextValue("My description", "en");
	ItemDocument itemDocument = ItemDocumentBuilder.forItemId(id)
			.withStatement(s1)
			.withRevisionId(1234)
			.build();
	ItemDocument expectedDocument = ItemDocumentBuilder.forItemId(id)
			.withDescription(description)
			.withStatement(s1)
			.withRevisionId(1235L)
			.build();
	
	Map<String, String> params = new HashMap<>();
	params.put("action", "wbsetdescription");
	params.put("id", "Q1234");
	params.put("summary", "Adding a description");
	params.put("token", "42307b93c79b0cb558d2dfb4c3c92e0955e06041+\\");
	params.put("format", "json");
	params.put("baserevid", "1234");
	params.put("maxlag", "5");
	params.put("language", "en");
	params.put("value", "My description");
	String expectedResult = "{\"entity\":{\"descriptions\":{\"en\":{\"language\":\"en\",\"value\":\"My description\"}},"+
			"\"id\":\"Q1234\",\"type\":\"item\",\"lastrevid\":1235},\"success\":1}";
	con.setWebResource(params, expectedResult);
	ItemDocument editedDocument = wde.updateTermsStatements(itemDocument, Collections.emptyList(),
			Collections.singletonList(description),	Collections.<MonolingualTextValue>emptyList(),
			Collections.<MonolingualTextValue>emptyList(), Collections.<Statement>emptyList(),
			Collections.<Statement>emptyList(), "Adding a description", null);
	assertEquals(expectedDocument, editedDocument);
}