Add unit tests

Added tests to reach 100% code coverage.