### Question:
UserAndHostAndPort implements Serializable { public static UserAndHostAndPort fromParts(String user, String host, int port) { return new UserAndHostAndPort(user, HostAndPort.fromParts(host, port)); } protected  UserAndHostAndPort(String user, HostAndPort hostAndPort); static UserAndHostAndPort fromParts(String user, String host, int port); static UserAndHostAndPort fromParts(String user, HostAndPort hostAndPort); static UserAndHostAndPort fromString(String str); String getUser(); HostAndPort getHostAndPort(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testFromParts() throws Exception { assertIt(UserAndHostAndPort.fromParts("myuser", "myhost", 1234), "myuser", HostAndPort.fromParts("myhost", 1234)); }