### Question:
HibernateSequenceDAO extends HibernatePersistentObjectDAO<Sequence> implements SequenceDAO { @Override public List<Sequence> findByName(String name, long tenantId) { String query = " _entity.tenantId=" + tenantId; query += " and _entity.name like '" + SqlUtil.doubleQuotes(name) + "%' "; try { return findByWhere(query, null, null); } catch (PersistenceException e) { log.error(e.getMessage(), e); return new ArrayList<Sequence>(); } } private  HibernateSequenceDAO(); @Override synchronized void reset(String sequence, long objectId, long tenantId, long value); @Override synchronized long next(String sequence, long objectId, long tenantId, long increment); @Override synchronized long next(String sequence, long objectId, long tenantId); @Override long getCurrentValue(String sequence, long objectId, long tenantId); @Override List<Sequence> findByName(String name, long tenantId); @Override Sequence findByAlternateKey(String name, long objectId, long tenantId); @Override void delete(String name, long objectId, long tenantId); @Override boolean delete(long id, int code);  }### Answer:
@Test public void testFindByName() { Collection<Sequence> sequences = dao.findByName("customid-", Tenant.DEFAULT_ID); Assert.assertNotNull(sequences); Assert.assertEquals(2, sequences.size()); }