add missing tests
extract mocks