### Question:
ServerName implements Comparable<ServerName> { public static long getServerStartcodeFromServerName(final String serverName) { int index = serverName.lastIndexOf(SERVERNAME_SEPARATOR); return Long.parseLong(serverName.substring(index + 1)); } ServerName(final String hostname, final int port, final long startcode);  ServerName(final String serverName);  ServerName(final String hostAndPort, final long startCode); static String parseHostname(final String serverName); static int parsePort(final String serverName); static long parseStartcode(final String serverName); @Override String toString(); synchronized byte [] getVersionedBytes(); String getServerName(); String getHostname(); int getPort(); long getStartcode(); static String getServerName(String hostName, int port, long startcode); static String getServerName(final String hostAndPort,
      final long startcode); String getHostAndPort(); static long getServerStartcodeFromServerName(final String serverName); static String getServerNameLessStartCode(String inServerName); @Override int compareTo(ServerName other); @Override int hashCode(); @Override boolean equals(Object o); static ServerName findServerWithSameHostnamePort(final Collection<ServerName> names,
      final ServerName serverName); static boolean isSameHostnameAndPort(final ServerName left,
      final ServerName right); static ServerName parseVersionedServerName(final byte [] versionedBytes); static ServerName parseServerName(final String str); static final int NON_STARTCODE; static final String SERVERNAME_SEPARATOR; static Pattern SERVERNAME_PATTERN; static final String UNKNOWN_SERVERNAME; }### Answer:
@Test public void getServerStartcodeFromServerName() { ServerName sn = new ServerName("www.example.org", 1234, 5678); assertEquals(5678, ServerName.getServerStartcodeFromServerName(sn.toString())); assertNotSame(5677, ServerName.getServerStartcodeFromServerName(sn.toString())); }