@Test
    void removeAllWithOneImageAndUnspecifiedTags() throws IOException, MojoExecutionException {
        givenProjectWithResolvedImage(singleImageWithoutBuildOrRunWithRemoveNamePattern("example:*"));

        givenRemoveMode("all");
        givenRemoveNamePattern(null);

        givenListOfImageNames("example:latest", "example:earlier-run", "example:1.0.0-MOCK");

        whenMojoExecutes();

        thenListImagesIsCalled();
        thenRemoveImageIsCalledFor("example:latest");
        thenRemoveImageIsCalledFor("example:earlier-run");
        thenRemoveImageIsCalledFor("example:1.0.0-MOCK");
    }
Mock project with one image that is removed by pattern
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java