tests and mocks