### Question:
HostPort { public int getPort() { return port; } HostPort(String host, int port); String getHost(); int getPort(); String getHostPort(); static HostPort parseHostPort(String string);  }### Answer:
@Test public void testGetPort() { HostPort hostPort = new HostPort("127.0.0.1", 2182); assertTrue(hostPort.getPort() == 2182); }