Add UT for number attribute type and refactor attribute type test case