improve code coverage in unit tests