Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
AuditReader auditReader = AuditReaderFactory.get(session);
AuditQuery query = auditReader.createQuery().forRevisionsOfEntity(Book.class, false /* complete revision data: if true just return Book objects */, true /* return deleted entities */).add(new IdentifierEqAuditExpression(book.getBookId(), true));
List<Object[]> bookRevisions = query.getResultList();
assertTrue("The entity does not have 4 revision records",bookRevisions.size() == 4);