DockerImagesCommand extends DockerCommand { public DockerImagesCommand getSingleImageStatus(String imageName) { Preconditions.checkNotNull(imageName, "imageName"); super.addCommandArguments("image", imageName); return this; } DockerImagesCommand(); DockerImagesCommand getSingleImageStatus(String imageName);  }
@Test public void testSingleImage() { dockerImagesCommand = dockerImagesCommand.getSingleImageStatus(IMAGE_NAME); assertEquals("images", StringUtils.join(",", dockerImagesCommand.getDockerCommandWithArguments() .get("docker-command"))); assertEquals("image name", "foo", StringUtils.join(",", dockerImagesCommand.getDockerCommandWithArguments().get("image"))); assertEquals(2, dockerImagesCommand.getDockerCommandWithArguments().size()); }