@Test
    void removeAllWithOneImageWithoutBuildOrRun() throws IOException, MojoExecutionException {
        givenProjectWithResolvedImage(singleImageWithoutBuildOrRun());

        givenRemoveMode("all");

        givenHasImage("example:latest");

        whenMojoExecutes();

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