public static DockerContainerStatus getContainerStatus(String containerId,
      PrivilegedOperationExecutor privilegedOperationExecutor,
      Context nmContext) {
    try {
      String currentContainerStatus =
          executeStatusCommand(containerId,
          privilegedOperationExecutor, nmContext);
      DockerContainerStatus dockerContainerStatus = parseContainerStatus(
          currentContainerStatus);
      LOG.debug("Container Status: {} ContainerId: {}",
          dockerContainerStatus.getName(), containerId);

      return dockerContainerStatus;
    } catch (ContainerExecutionException e) {
      LOG.debug("Container Status: {} ContainerId: {}",
          DockerContainerStatus.NONEXISTENT.getName(), containerId);
      return DockerContainerStatus.NONEXISTENT;
    }
  }
@Test
  public void testGetContainerStatus() throws Exception {
    for (DockerContainerStatus status : DockerContainerStatus.values()) {
      when(mockExecutor.executePrivilegedOperation(eq(null),
          any(PrivilegedOperation.class), eq(null), any(), eq(true), eq(false)))
          .thenReturn(status.getName());
      assertEquals(status, DockerCommandExecutor.getContainerStatus(
          MOCK_CONTAINER_ID, mockExecutor, nmContext));
    }
  }