@Test(expected = AssertUserFailedException.class)
public void testCheckCredentials() throws IOException, MediaWikiApiErrorException, LoginFailedException {

	// we first login successfully
	connection.login("username", "password");
	assertTrue(connection.isLoggedIn());
	// after a while, the credentials expire
	connection.checkCredentials();
}