@Test
    void stopWithAliasNamePattern(@Mock Container running1, @Mock Container running2,
        @Mock Container running3) throws IOException, MojoExecutionException, ExecException {
        this.consoleLogger.setThreshold(0);
        givenProjectWithResolvedImage(singleImageWithRunAndAlias("example-2"));

        givenAllContainersIsTrue();

        givenRunningContainer(running1, "container-id-1", "example-1");
        givenRunningContainer(running2, "container-id-2", "example-2");
        givenRunningContainer(running3, "container-id-3", "example-3");
        givenContainersAreRunningForImage("example:latest", running1, running2, running3);

        // If name pattern doesn't contain index placeholder, all containers are stopped
        stopMojo.containerNamePattern= "%a";

        whenMojoExecutes();

        thenContainerLookupByImageOccurs("example:latest");
        thenListContainersIsNotCalled();
        thenContainerIsNotStopped("container-id-1");
        thenContainerIsStopped("container-id-2", false, false);
        thenContainerIsNotStopped("container-id-3");
    }
Mock project with one image, query service indicates three running images, none labelled,
but allContainers is true.
<p>
The containers are named with ascending indices - but this doesn't match the container
name pattern, so all are stopped.
src/test/java/io/fabric8/maven/docker/StopMojoTest.java