Add basic unittest.
Delete unused definition.