private Assertion assertAreEqual(Stack<Command> expected, Stack<Command> actual)
  {
    boolean passed = false;
    String info = "Assertion failed for unknown reasons";
    if (expected != null && actual != null)
    {
      if (expected.size() != actual.size())
      {
        passed = false;
        info = "The actual stack is not the same size as the expected stack";
      }
      else
      {
        boolean allEqual = true;
        while (!expected.isEmpty())
        {
          Command expectedValue = expected.pop();
          Command actualValue = actual.pop();
          if (!expectedValue.equals(actualValue))
          {
            allEqual = false;
            passed = false;
            info = "Not all commands in the expected and actual stacks are identical";
            break;
          }
        }
        if (allEqual)
        {
          passed = true;
          info = "The actual and expected stacks match";
        }
      }
    }
    else
    {
      info = "At least one of the input stacks was null";
    }
    return new Assertion(passed, info);
  }