add class utility and its test case