@Test
public void testSourceConnectionFailFirst() {

    authenticate(true);
    
    listener.onMessage(TestListener.errorMessage());
    
    assert !client.getSourceConnectionFuture().getNow(true); // It should be set to false now
    
    Map<String,Object> config = new LinkedHashMap<>();
    String key = "key";
    String val = "value";
    config.put(key, val);
    connectToSource(srcName, config);
    
    assert client.isConnected();
    assert cHandler.compareOp(ExtensionServiceMessage.OP_CONFIGURE_EXTENSION);
    assert cHandler.compareSourceName(srcName);
    assert cHandler.compareValue("config",config);
}