@Test
@SuppressWarnings({ "rawtypes" })

public void testStop_errorOnClose() throws Exception {
	// Mockito does not like classes with generic... <_<
	ReconfigurableClient parent = Mockito.mock( ReconfigurableClientDm.class );
	Mockito.doThrow( new IOException( "For tests..." )).when( parent ).closeConnection();
	HttpAgentClient client = new HttpAgentClient( parent, "localhost", 24587 );
	this.factory.agentClients.add( client );
	Assert.assertEquals( 1, this.factory.agentClients.size());
	this.factory.stop();
	Assert.assertEquals( 0, this.factory.agentClients.size());
	Mockito.verify( parent, Mockito.times( 1 )).closeConnection();
}