added unit tests

Added unit test.