Fixed tests and added test coverage check