### Question:
DAOSupplierImpl extends AbstractDAO<SupplierEntity, JPASupplierEntity> implements DAOSupplier { @Override public List<SupplierEntity> getAllActiveSuppliers() { return this.checkEntityList(this.querySupplier().active.eq(true).findList(), SupplierEntity.class); }  @Override SupplierEntity getEntityInstance(); @Override List<SupplierEntity> getAllActiveSuppliers();  }### Answer:
@Test public void getAllActiveSuppliers_noSuppliers() { List<SupplierEntity> suppliers = DAOSupplierImplTest.daoSupplierImpl.getAllActiveSuppliers(); Assert.assertEquals(suppliers.size(), 0); }
@Test public void getAllActiveSuppliers_noActiveSuppliers() { Ebean.beginTransaction(); JPASupplierEntity supplier = new JPASupplierEntity(); supplier.setUID(DAOSupplierImplTest.inactiveObjUid); supplier.setName("Test Supplier 0"); Ebean.commitTransaction(); List<SupplierEntity> suppliers = DAOSupplierImplTest.daoSupplierImpl.getAllActiveSuppliers(); Assert.assertEquals(suppliers.size(), 0); }
@Test public void getAllActiveSuppliers() { Ebean.beginTransaction(); JPASupplierEntity supplier = new JPASupplierEntity(); supplier.setUID(DAOSupplierImplTest.existingObjUid1); supplier.setName("Test Supplier 1"); DAOSupplierImplTest.daoSupplierImpl.create(supplier); supplier = new JPASupplierEntity(); supplier.setUID(DAOSupplierImplTest.existingObjUid2); supplier.setName("Test Supplier 2"); DAOSupplierImplTest.daoSupplierImpl.create(supplier); Ebean.commitTransaction(); List<SupplierEntity> suppliers = DAOSupplierImplTest.daoSupplierImpl.getAllActiveSuppliers(); Assert.assertEquals(suppliers.size(), 2); }