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

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

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

        // Must bound at the same port number.
        assertThat(ports.stream().mapToInt(p -> p.localAddress().getPort()).distinct()).hasSize(1);

        // Must belong to the same port group.
        assertThat(ports.stream().mapToLong(ServerPort::portGroup).distinct()).hasSize(1);
    }
{@link Server} must use the same port number for all loopback addresses when 1) the port number is 0 and
2) the port number was specified with {@link ServerBuilder#localPort(int, Iterable)}.
core/src/test/java/com/linecorp/armeria/server/ServerEphemeralLocalPortTest.java