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

	MockBasicApiConnection con = new MockBasicApiConnection();
	Map<String, String> params = new HashMap<>();
	params.put("action", "query");
	params.put("maxlag", "-1");
	params.put("format", "json");
	con.setWebResourceFromPath(params, this.getClass(),
			"/error-maxlag-full.json",
			CompressionType.NONE);
	
	WbEditingAction weea = new WbEditingAction(
			con, Datamodel.SITE_WIKIDATA);
	double lag = weea.getCurrentLag();
	assertEquals(3.45, lag, 0.001);
}