default Integer getFirstMappedPort() {
        return getExposedPorts()
            .stream()
            .findFirst()
            .map(this::getMappedPort)
            .orElseThrow(() -> new IllegalStateException("Container doesn't expose any ports"));
    }
Get the actual mapped port for a first port exposed by the container.
Should be used in conjunction with {@link #getHost()}.

@return the port that the exposed port is mapped to
@throws IllegalStateException if there are no exposed ports
core/src/main/java/org/testcontainers/containers/ContainerState.java