DeletedConsumerCurator extends AbstractHibernateCurator<DeletedConsumer> { public DeletedConsumer findByConsumerUuid(String uuid) { return (DeletedConsumer) currentSession().createCriteria(DeletedConsumer.class) .add(Restrictions.eq("consumerUuid", uuid)) .uniqueResult(); } DeletedConsumerCurator(); DeletedConsumer findByConsumer(Consumer c); DeletedConsumer findByConsumerUuid(String uuid); CandlepinQuery<DeletedConsumer> findByOwner(Owner o); @SuppressWarnings("unchecked") CandlepinQuery<DeletedConsumer> findByOwnerId(String oid); int countByConsumer(Consumer c); int countByConsumerUuid(String uuid); @SuppressWarnings("unchecked") CandlepinQuery<DeletedConsumer> findByDate(Date date);  }
@Test public void byConsumerId() { DeletedConsumer found = dcc.findByConsumerUuid("abcde"); assertEquals("abcde", found.getConsumerUuid()); }