refactor - use asserts with in-memory mocks