added test function for TypeCommand function