unit test for type sugar