Extracted DatabaseMock to fully operational in-memory database