@Test
    void builtWithoutLocalPort() {
        final Collection<ServerPort> ports = serverBuiltWithoutLocalPort.server().activePorts().values();

        // Must bound to both IPv4 and IPv6 loopback addresses.
        assertThat(ports).hasSize(2);

        // Must be loopback addresses and not belong to any port group.
        ports.forEach(p -> {
            assertThat(p.localAddress().getAddress().isLoopbackAddress()).isTrue();
            assertThat(p.portGroup()).isZero();
        });

        // Must bound at two different port numbers because we didn't use `localPort()`.
        assertThat(ports.stream().mapToInt(p -> p.localAddress().getPort()).distinct()).hasSize(2);
    }
{@link Server} must not use the same port number for the loopback addresses if a user did not use
{@link ServerBuilder#localPort(int, SessionProtocol...)}.
core/src/test/java/com/linecorp/armeria/server/ServerEphemeralLocalPortTest.java