### Question:
MongoDao implements GenericDao<T, ID> { @Override public List<T> findAll() { Query<T> q = datastore.createQuery(persistentClass); return q.asList(); } @Inject  MongoDao(Datastore datastore, Class<T> persistentClass); @Override boolean exists(ID id); @Override List<T> findAll(); @Override T findById(ID id); @Override T save(T entity); @Override T update(T entity); @Override void delete(T entity); @Override void deleteById(ID id); Query<T> query();  }### Answer:
@Test public void findAllEntities() { List<TestEntity> entityList = mongoDao.findAll(); assertEquals("There should be one entity in the datastore", 1, entityList.size()); assertEquals("The mocked entity should match the retrieved entity", entityList.get(0), mockedEntity); }