public static Port parseProtocol(int port, String protocolString) {
    String protocol = UDP_PROTOCOL.equalsIgnoreCase(protocolString) ? UDP_PROTOCOL : TCP_PROTOCOL;
    return new Port(port, protocol);
  }
@Test
  public void testParseProtocol() {
    Assert.assertEquals(Port.tcp(1111), Port.parseProtocol(1111, "tcp"));
    Assert.assertEquals(Port.udp(2222), Port.parseProtocol(2222, "udp"));
    Assert.assertEquals(Port.tcp(3333), Port.parseProtocol(3333, ""));
  }