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

	MockBasicApiConnection con = new MockBasicApiConnection();
	Map<String, String> params = new HashMap<>();
	params.put("action", "query");
	params.put("meta", "tokens");
	params.put("format", "json");
	params.put("type", "csrf");
	// This error makes no sense for this action, but that does not matter
	// here:
	con.setWebResource(params, "{}");
	params.clear();
	params.put("action", "wbeditentity");
	params.put("id", "Q42");
	params.put("token", null);
	params.put("format", "json");
	params.put("data", "{}");
	params.put("maxlag", "5");
	con.setWebResourceFromPath(params, this.getClass(),
			"/error-badtoken.json", CompressionType.NONE);
	WbEditingAction weea = new WbEditingAction(con,
			Datamodel.SITE_WIKIDATA);
	weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null);
}