### Question:
HealthCheck extends Descriptor { public static TcpHealthCheck.Builder newTcpHealthCheck() { return TcpHealthCheck.newBuilder(); } HealthCheck(final String type); String getType(); static ExecHealthCheck.Builder newExecHealthCheck(); static HttpHealthCheck.Builder newHttpHealthCheck(); static TcpHealthCheck.Builder newTcpHealthCheck(); @Override String toString(); static final String EXEC; static final String HTTP; static final String TCP; }### Answer:
@Test public void testTcpHealthCheckBuilder() { final TcpHealthCheck healthCheck = HealthCheck.newTcpHealthCheck().setPort("http-admin").build(); assertEquals("port", "http-admin", healthCheck.getPort()); }
@Test(expected = IllegalArgumentException.class) public void testTcpWithoutPort() { HealthCheck.newTcpHealthCheck().build(); }