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

        givenRemoveMode("all");

        givenListOfImageNames("example:earlier-run");

        whenMojoExecutes();

        thenListImagesIsNotCalled();
        thenRemoveImageIsNotCalledFor("example:latest");
    }
Mock project with one image that is removed by pattern
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java