@Test
public void getServer() {

    ServerConfig serverConfig = new ServerConfig().setProtocol("test").setPort(1234);
    Server server = ServerFactory.getServer(serverConfig);
    Assert.assertNotNull(server);
    boolean error = false;
    try {
        serverConfig = new ServerConfig().setProtocol("test1").setPort(2345);
        ServerFactory.getServer(serverConfig);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
    Assert.assertTrue(ServerFactory.getServers().size() > 0);
    ServerFactory.destroyAll();
}