Unit test

Fix unit test and make it happy