@Test(expected = TokenErrorException.class)
public void testCreateItemBadToken() throws IOException,
		MediaWikiApiErrorException {

	WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
			Datamodel.SITE_WIKIDATA);
	ItemDocument itemDocument = ItemDocumentBuilder.forItemId(
			ItemIdValue.NULL).build();
	Map<String, String> params = new HashMap<>();
	params.put("action", "wbeditentity");
	params.put("summary", "My summary");
	params.put("new", "item");
	params.put("token", "42307b93c79b0cb558d2dfb4c3c92e0955e06041+\\");
	params.put("format", "json");
	params.put("maxlag", "5");
	String data = JsonSerializer.getJsonString(itemDocument);
	params.put("data", data);
	this.con.setWebResourceFromPath(params, this.getClass(),
			"/error-badtoken.json", CompressionType.NONE);
	wde.createItemDocument(itemDocument, "My summary", null);
}