RemoteMachine { public final int getPort() { return port; } RemoteMachine(String hostname, int port); final String getHostname(); final int getPort();  }
@Test public void testPortGetter() { RemoteMachine machine = new RemoteMachine("mac", 10); assertEquals(10, machine.getPort()); }