### Question:
MongoComponentDao extends MongoDao<Component, String> implements ComponentDao { @Override public Component findByFrameworkAndName(String framework, String name) { return query().field("framework").equal(framework) .field("name").equal(name).get(); } @Inject  MongoComponentDao(Datastore datastore); @Override List<Component> findAll(); @Override List<Component> findAllWithFramework(String framework); @Override Component findByFrameworkAndName(String framework, String name);  }### Answer:
@Test public void findComponentByFrameworkAndName() { Component validComponent = componentDao.findByFrameworkAndName("test", "first-component"); assertNotNull("The returned component should not be null with valid query values", validComponent); Component invalidComponent = componentDao.findByFrameworkAndName("test", "invalid-component"); assertNull("The returned component should be null with invalid query values", invalidComponent); }