Added unit tests to complete coverage