@Test
public void testHashCode() {

    ServerConfig config1 = new ServerConfig();
    ServerConfig config2 = new ServerConfig();
    config1.setHost("127.0.0.1").setPort(1234).setProtocol("xxx");
    config2.setHost("127.0.0.1").setPort(1235).setProtocol("xxx");
    Assert.assertFalse(config1.hashCode() == config2.hashCode());
    config2.setPort(1234);
    Assert.assertTrue(config1.hashCode() == config2.hashCode());
}