Test CommandHistory