Increase test coverage

The goal is to have the current feature set 100% covered by unit tests.