@Test
    void removeWithRemovePatternAndNoImages() throws IOException, MojoExecutionException {
        givenMavenProject();
        givenRemoveNamePattern("example:*");
        givenListOfImageNames("example:latest");

        whenMojoExecutes();

        thenListImagesIsCalled();
        thenRemoveImageIsCalledFor("example:latest");
    }
Mock project with no images, but a pattern is provided.
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java