Map<String, SshClient> clients = beanDefinitionContext.getBeansOfType(SshClient.class);
Assert.assertEquals(clients.size(), 2);
// 1st client
SshClient client = clients.get("sshClient1");
Assert.assertEquals(client.getEndpointConfiguration().getHost(), "localhost");
Assert.assertEquals(client.getEndpointConfiguration().getPort(), 2222);
Assert.assertEquals(client.getEndpointConfiguration().getUser(), "citrus");
Assert.assertNull(client.getEndpointConfiguration().getPassword());
Assert.assertNull(client.getEndpointConfiguration().getPrivateKeyPath());
Assert.assertNull(client.getEndpointConfiguration().getPrivateKeyPassword());
Assert.assertNull(client.getEndpointConfiguration().getKnownHosts());
Assert.assertEquals(client.getEndpointConfiguration().getCommandTimeout(), 1000 * 60 * 5);
Assert.assertEquals(client.getEndpointConfiguration().getConnectionTimeout(), 1000 * 60 * 1);
Assert.assertFalse(client.getEndpointConfiguration().isStrictHostChecking());
Assert.assertNotNull(client.getEndpointConfiguration().getXmlMapper());
// 2nd client
client = clients.get("sshClient2");
Assert.assertEquals(client.getEndpointConfiguration().getHost(), "dev7");
Assert.assertEquals(client.getEndpointConfiguration().getPort(), 10022);
Assert.assertEquals(client.getEndpointConfiguration().getUser(), "foo");
Assert.assertEquals(client.getEndpointConfiguration().getPassword(), "bar");
Assert.assertEquals(client.getEndpointConfiguration().getPrivateKeyPath(), "classpath:com/consol/citrus/ssh/citrus.priv");
Assert.assertEquals(client.getEndpointConfiguration().getPrivateKeyPassword(), "consol");
Assert.assertEquals(client.getEndpointConfiguration().getKnownHosts(), "classpath:com/consol/citrus/ssh/known_hosts");
Assert.assertEquals(client.getEndpointConfiguration().getCommandTimeout(), 10000);
Assert.assertEquals(client.getEndpointConfiguration().getConnectionTimeout(), 5000);
Assert.assertTrue(client.getEndpointConfiguration().isStrictHostChecking());
Assert.assertNotNull(client.getEndpointConfiguration().getXmlMapper());
}