InProcessServer implements InternalServer { @Override public int getPort() { return -1; } InProcessServer(String name); @Override void start(ServerListener serverListener); @Override int getPort(); @Override void shutdown();  }
@Test public void getPort_notStarted() throws Exception { InProcessServer s = new InProcessServer("name"); Truth.assertThat(s.getPort()).isEqualTo(-1); }