Working version with 100% code coverage.