add tests for CategoryEncoder
use proper self.assert() for unittests2

only assert xxx will not trigger failure, must use self.assertWHATEVER()