@ParameterizedTest
    @ValueSource(strings = {"all", "build", "data"})
    @NullSource
    void removeAllWithOneImage(String removeMode) throws IOException, MojoExecutionException {
        givenProjectWithResolvedImage(singleImageWithBuild());
        
        givenRemoveMode(removeMode);

        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