assertEquals("ex2.com:50030",ServerName.getServerName("ex2.com", 50030));
}
@Test
public void testCompareTo() {
ServerName s1 = new ServerName("ex1.com:50030");
ServerName s2 = new ServerName("ex1.com:60030");
assertTrue(s1.compareTo(s2) < 0);
assertTrue(s2.compareTo(s1) > 0);
ServerName s3 = new ServerName("ex1.com:50030");
assertTrue(s1.compareTo(s3) == 0);
ServerName s4 = new ServerName("ex2.com:50030");
assertTrue(s1.compareTo(s4) < 0);
assertTrue(s4.compareTo(s1) > 0);
}