Add unit test for the newly API.