Added some unit test and first wrote by tdd rest method.