@Test
    void removeBuildWithOneBuildImageAndTags() throws IOException, MojoExecutionException {
        givenProjectWithResolvedImage(singleImageWithBuildWithTags("fastest", "loosest"));

        givenRemoveMode("build");
        givenSkipTag(false);

        givenHasImage("example:latest");
        givenHasImage("example:fastest");
        givenHasImage("example:loosest");

        whenMojoExecutes();

        thenRemoveImageIsCalledFor("example:latest");
        thenRemoveImageIsCalledFor("example:fastest");
        thenRemoveImageIsCalledFor("example:loosest");
        thenListImagesIsNotCalled();
    }
Mock project with one build image that is removed, as well as its tags
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java