public void assertCompatibleWith(DockerImageName... anyOthers) {
        if (anyOthers.length == 0) {
            throw new IllegalArgumentException("anyOthers parameter must be non-empty");
        }

        for (DockerImageName anyOther : anyOthers) {
            if (this.isCompatibleWith(anyOther)) {
                return;
            }
        }

        final DockerImageName exampleOther = anyOthers[0];

        throw new IllegalStateException(
            String.format(
                "Failed to verify that image '%s' is a compatible substitute for '%s'. This generally means that " +
                "you are trying to use an image that Testcontainers has not been designed to use. If this is " +
                "deliberate, and if you are confident that the image is compatible, you should declare " +
                "compatibility in code using the `asCompatibleSubstituteFor` method. For example:\n" +
                "   DockerImageName myImage = DockerImageName.parse(\"%s\").asCompatibleSubstituteFor(\"%s\");\n" +
                "and then use `myImage` instead.",
                this.rawName,
                exampleOther.rawName,
                this.rawName,
                exampleOther.rawName
            )
        );
    }
Behaves as {@link DockerImageName#isCompatibleWith(DockerImageName)} but throws an exception
rather than returning false if a mismatch is detected.

@param anyOthers the other image(s) that we are trying to check compatibility with. If more
                 than one is provided, this method will check compatibility with at least one
                 of them.
@throws IllegalStateException if {@link DockerImageName#isCompatibleWith(DockerImageName)}
                              returns false
core/src/main/java/org/testcontainers/utility/DockerImageName.java