public static HostName of(String value) {
        return new HostName(value);
    }
@Test
    void testNames() {
        HostName.of("name-123.0.321-eman");
        HostName.of(("." + "a".repeat(32)).repeat(2).substring(1, 65));
        HostName.of("123");

        assertThrows(IllegalArgumentException.class, () -> HostName.of("_"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("-"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("."));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("-foo"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo-"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of(".foo"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo."));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo..bar"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo.-.bar"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo/"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("foo%"));
        assertThrows(IllegalArgumentException.class, () -> HostName.of(("." + "a".repeat(32)).repeat(2).substring(1, 66)));
        assertThrows(IllegalArgumentException.class, () -> HostName.of("a".repeat(64)));
    }