@Test public void countEventsForEntityAndType() { ArgumentCaptor<Criterion> criterion = ArgumentCaptor.forClass(Criterion.class); long count = this.store.countEventsForEntity(this.doc, "action"); Mockito.verify(this.criteria).setProjection(Matchers.any(RowCountProjection.class)); Mockito.verify(this.criteria).add(criterion.capture()); Example ex = (Example) criterion.getValue(); Assert.assertEquals("example (null (null): action on wiki:Space.Page at null)", ex.toString()); Assert.assertEquals(0, count); }
@Override public long countEventsForEntity(DocumentReference entity) { return getCount(null, null, null, entity); }
HibernateAuditStore implements AuditStore { @Override public long countEventsForEntity(DocumentReference entity) { return getCount(null, null, null, entity); } }
HibernateAuditStore implements AuditStore { @Override public long countEventsForEntity(DocumentReference entity) { return getCount(null, null, null, entity); }  }
HibernateAuditStore implements AuditStore { @Override public long countEventsForEntity(DocumentReference entity) { return getCount(null, null, null, entity); }  @Override void store(AuditEvent event); @Override List<AuditEvent> getEventsForEntity(DocumentReference entity); @Override List<AuditEvent> getEventsForEntity(DocumentReference entity, String type); @Override List<AuditEvent> getEventsForUser(User user); @Override List<AuditEvent> getEventsForUser(User user, String ip); @Override List<AuditEvent> getEventsForUser(User user, String ip, String type); @Override List<AuditEvent> getEvents(AuditEvent eventTemplate, Calendar fromTime, Calendar toTime, int start,
        int maxResults); @Override long countEventsForEntity(DocumentReference entity); @Override long countEventsForEntity(DocumentReference entity, String type); @Override long countEventsForUser(User user); @Override long countEventsForUser(User user, String ip); @Override long countEventsForUser(User user, String ip, String type); @Override long countEvents(AuditEvent eventTemplate, Calendar fromTime, Calendar toTime); }
HibernateAuditStore implements AuditStore { @Override public long countEventsForEntity(DocumentReference entity) { return getCount(null, null, null, entity); }  @Override void store(AuditEvent event); @Override List<AuditEvent> getEventsForEntity(DocumentReference entity); @Override List<AuditEvent> getEventsForEntity(DocumentReference entity, String type); @Override List<AuditEvent> getEventsForUser(User user); @Override List<AuditEvent> getEventsForUser(User user, String ip); @Override List<AuditEvent> getEventsForUser(User user, String ip, String type); @Override List<AuditEvent> getEvents(AuditEvent eventTemplate, Calendar fromTime, Calendar toTime, int start,
        int maxResults); @Override long countEventsForEntity(DocumentReference entity); @Override long countEventsForEntity(DocumentReference entity, String type); @Override long countEventsForUser(User user); @Override long countEventsForUser(User user, String ip); @Override long countEventsForUser(User user, String ip, String type); @Override long countEvents(AuditEvent eventTemplate, Calendar fromTime, Calendar toTime);  }