private void verifyRemoveImage(String imageName, int wantedNumberOfInvocations) throws DockerAccessException {
        Mockito.verify(dockerAccess, Mockito.times(wantedNumberOfInvocations)).removeImage(imageName, true);
    }
Mock project with one image that is removed by pattern
src/test/java/io/fabric8/maven/docker/RemoveMojoTest.java