DockerCommandExecutor { public static boolean isKillable(DockerContainerStatus containerStatus) { return isStoppable(containerStatus); } private  DockerCommandExecutor(); static String executeDockerCommand(DockerCommand dockerCommand,
      String containerId, Map<String, String> env,
      PrivilegedOperationExecutor privilegedOperationExecutor,
      boolean disableFailureLogging, Context nmContext); static DockerContainerStatus getContainerStatus(String containerId,
      PrivilegedOperationExecutor privilegedOperationExecutor,
      Context nmContext); static DockerContainerStatus parseContainerStatus(
      String containerStatusStr); static boolean isStoppable(DockerContainerStatus containerStatus); static boolean isKillable(DockerContainerStatus containerStatus); static boolean isRemovable(DockerContainerStatus containerStatus); static boolean isStartable(DockerContainerStatus containerStatus);  }
@Test public void testIsKIllable() { assertTrue(DockerCommandExecutor.isKillable( DockerContainerStatus.RUNNING)); assertTrue(DockerCommandExecutor.isKillable( DockerContainerStatus.RESTARTING)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.EXITED)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.CREATED)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.DEAD)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.NONEXISTENT)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.REMOVING)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.STOPPED)); assertFalse(DockerCommandExecutor.isKillable( DockerContainerStatus.UNKNOWN)); }