@Test
public void testExecuteDockerRm() throws Exception {

  DockerRmCommand dockerCommand =
      new DockerRmCommand(MOCK_CONTAINER_ID, null);
  DockerCommandExecutor.executeDockerCommand(dockerCommand, MOCK_CONTAINER_ID,
      env, mockExecutor, false, nmContext);
  List<PrivilegedOperation> ops = MockPrivilegedOperationCaptor
      .capturePrivilegedOperations(mockExecutor, 1, true);
  PrivilegedOperation privOp = ops.get(0);
  List<String> args = privOp.getArguments();
  assertEquals(1, ops.size());
  assertEquals(PrivilegedOperation.OperationType.
      REMOVE_DOCKER_CONTAINER.name(),
      privOp.getOperationType().name());
  assertEquals(1, args.size());
  assertEquals(MOCK_CONTAINER_ID, args.get(0));
}