### Question:
MongoResourceDao extends MongoDao<Resource, String> implements ResourceDao { @Override public Resource findByFrameworkAndName(String framework, String name) { return query().field("framework").equal(framework) .field("name").equal(name).get(); } @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 findResourceByFrameworkAndName() { Resource validResource = resourceDao.findByFrameworkAndName("test", "first-resource"); assertNotNull("The returned resource should not be null with valid query values", validResource); Resource invalidResource = resourceDao.findByFrameworkAndName("test", "invalid-resource"); assertNull("The returned resource should be null with invalid query values", invalidResource); }