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

        givenRemoveMode("build");

        whenMojoExecutes();

        thenHasImageIsNotCalled();
        thenListImagesIsNotCalled();
        thenRemoveImageIsNotCalled();
    }
Mock project with no build images, no images are removed.
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java