Mocking libraries come with disadvantages, but fortunately they can be replaced by in-memory implementations, at least for repositories.