### Question:
MongoResourceDao extends MongoDao<Resource, String> implements ResourceDao { @Override public List<Resource> findAllWithFramework(String framework) { return query().field("framework").equal(framework).order("label").asList(); } @Inject  MongoResourceDao(Datastore datastore); @Override List<Resource> findAll(); @Override List<Resource> findAllWithFramework(String framework); @Override Resource findByFrameworkAndName(String framework, String name);  }### Answer:
@Test public void findAllResourceWithFramework() { List<Resource> resources = resourceDao.findAllWithFramework("test"); assertEquals("There should be 2 resources with the given framework", 2, resources.size()); assertEquals("The first item in the resource list should have and id of \"first\"", "first", resources.get(0).getId()); assertEquals("The second item in the resource list should have and id of \"third\"", "third", resources.get(1).getId()); }