Added unit tests.