Added unit test code