Added unit test with coverage