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