### Question:
RasdManagementDAO extends DefaultDAOBase<Integer, RasdManagement> { @SuppressWarnings("unchecked") public List<RasdManagement> findByVirtualDatacenterAndResourceType( final VirtualDatacenter virtualDatacenter, final String resourceType) { return createCriteria(sameVirtualDatacenter(virtualDatacenter), sameResourceType(resourceType)).list(); } RasdManagementDAO();  RasdManagementDAO(final EntityManager entityManager); @SuppressWarnings("unchecked") List<RasdManagement> findByVirtualDatacenterAndResourceType(
        final VirtualDatacenter virtualDatacenter, final String resourceType); List<RasdManagement> findByVirtualMachine(final VirtualMachine virtualMachine); List<RasdManagement> findDisksAndVolumesByVirtualMachine(
        final VirtualMachine virtualMachine); void enableTemporalOnlyFilter(); void restoreDefaultFilters();  }### Answer:
@Test public void testFindByVirtualDatacenterAndResourceType() { RasdManagement rasdManagement = eg().createInstance(VolumeManagement.DISCRIMINATOR); List<Object> entitiesToPersist = new ArrayList<Object>(); eg().addAuxiliaryEntitiesToPersist(rasdManagement, entitiesToPersist); persistAll(ds(), entitiesToPersist, rasdManagement); RasdManagementDAO dao = createDaoForRollbackTransaction(); Collection<RasdManagement> results = dao.findByVirtualDatacenterAndResourceType(rasdManagement.getVirtualDatacenter(), VolumeManagement.DISCRIMINATOR); assertEquals(results.size(), 1); eg().assertAllPropertiesEqual(results.iterator().next(), rasdManagement); }