Map<String, SshServer> servers = beanDefinitionContext.getBeansOfType(SshServer.class);
Assert.assertEquals(servers.size(), 3);
// 1st server
SshServer server = servers.get("sshServer1");
Assert.assertEquals(server.getName(), "sshServer1");
Assert.assertEquals(server.getPort(), 22);
Assert.assertFalse(server.isAutoStart());
Assert.assertNull(server.getAllowedKeyPath());
Assert.assertNull(server.getHostKeyPath());
Assert.assertNull(server.getUser());
Assert.assertNull(server.getPassword());
Assert.assertTrue(server.getEndpointAdapter() instanceof ChannelEndpointAdapter);
Assert.assertNull(server.getActor());
// 2nd server
server = servers.get("sshServer2");
Assert.assertEquals(server.getName(), "sshServer2");
Assert.assertEquals(server.getPort(), 10022);
Assert.assertFalse(server.isAutoStart());
Assert.assertEquals(server.getAllowedKeyPath(), "classpath:com/consol/citrus/ssh/citrus_pub.pem");
Assert.assertEquals(server.getHostKeyPath(), "classpath:com/consol/citrus/ssh/citrus.pem");
Assert.assertEquals(server.getUser(), "foo");
Assert.assertEquals(server.getPassword(), "bar");
Assert.assertTrue(server.getEndpointAdapter() instanceof ChannelEndpointAdapter);
Assert.assertNull(server.getActor());
// 3rd server
server = servers.get("sshServer3");
Assert.assertEquals(server.getName(), "sshServer3");
Assert.assertEquals(server.getPort(), 22);
Assert.assertFalse(server.isAutoStart());
Assert.assertNull(server.getAllowedKeyPath());
Assert.assertNull(server.getHostKeyPath());
Assert.assertNull(server.getUser());
Assert.assertNull(server.getPassword());
Assert.assertEquals(server.getEndpointAdapter(), beanDefinitionContext.getBean("sshServerAdapter"));
Assert.assertNull(server.getActor());
}