ServicioAuditoriaImpl implements AuditoriaService { public List<TrazaAuditoriaVO> findByObjectId(Long appId, String objectId, Date startDate, Date endDate) { CriteriaVO criteria = CriteriaHelper.getObjectIdCriteria(appId, objectId, startDate, endDate); List<TrazaAuditoriaVO> results = null; try { results = auditoriaManager.findByCriteria(criteria); } catch (Exception e) { auditoriaExceptionHandler.handleException(e, ExceptionMessageConstans.ERROR_FIND); } return results; }  AuditoriaManager getAuditoriaManager(); void setAuditoriaManager(AuditoriaManager auditoriaManager); AuditoriaExceptionHandler getAuditoriaExceptionHandler(); void setAuditoriaExceptionHandler(AuditoriaExceptionHandler auditoriaExceptionHandler); void audit(TrazaAuditoriaVO traza); Integer countByCriteria(CriteriaVO criteria); List<TrazaAuditoriaVO> findByCriteria(CriteriaVO criteria); TrazaAuditoriaVO getTraza(String idTraza); PaginatedList<TrazaAuditoriaVO> findByCriteria(CriteriaVO criteria,
			PaginationContext paginationContext); List<TrazaAuditoriaVO> findByAppIdEventType(Long appId, Long eventType, Date startDate,
			Date endDate); PaginatedList<TrazaAuditoriaVO> findByAppIdEventType(Long appId, Long eventType,
			Date startDate, Date endDate, PaginationContext paginationContext); List<TrazaAuditoriaVO> findByUserIdAppId(String userId, Long appId, Date startDate,
			Date endDate); PaginatedList<TrazaAuditoriaVO> findByUserIdAppId(String userId, Long appId,
			Date startDate, Date endDate, PaginationContext paginationContext); List<TrazaAuditoriaVO> findByUserId(String userId, Date startDate, Date endDate); PaginatedList<TrazaAuditoriaVO> findByUserId(String userId, Date startDate,
			Date endDate, PaginationContext paginationContext); List<TrazaAuditoriaVO> findByUserObjectId(String userId, Long appId, Long eventType,
			String objectId, Date startDate, Date endDate); PaginatedList<TrazaAuditoriaVO> findByUserObjectId(String userId, Long appId,
			Long eventType, String objectId, Date startDate, Date endDate,
			PaginationContext paginationContext); List<TrazaAuditoriaVO> findByUserObjectField(String userId, Long appId, Long eventType,
			String objectId, String objectField, Date startDate, Date endDate); PaginatedList<TrazaAuditoriaVO> findByUserObjectField(String userId, Long appId,
			Long eventType, String objectId, String objectField, Date startDate, Date endDate,
			PaginationContext paginationContext); List<TrazaAuditoriaVO> findByObjectId(Long appId, String objectId, Date startDate,
			Date endDate); PaginatedList<TrazaAuditoriaVO> findByObjectId(Long appId, String objectId,
			Date startDate, Date endDate, PaginationContext paginationContext); List<TrazaAuditoriaVO> findLikeObjectId(Long appId, String objectId, Date startDate,
			Date endDate); PaginatedList<TrazaAuditoriaVO> findLikeObjectId(Long appId, String objectId,
			Date startDate, Date endDate, PaginationContext paginationContext); List<TrazaAuditoriaVO> findLikeUserObjectId(String userId, Long appId, String objectId,
			Date startDate, Date endDate); PaginatedList<TrazaAuditoriaVO> findLikeUserObjectId(String userId, Long appId,
			String objectId, Date startDate, Date endDate, PaginationContext paginationContext); AppAuditoriaVO getAppAuditoria(String appDescripion);  }
@Test public void testFindByObjectId() { List<TrazaAuditoriaVO> results = null; results = auditoriaService.findByObjectId(new Long(2), "2", new Date(0), new Date()); Assert.assertEquals(results.size(), 1); PaginatedList<TrazaAuditoriaVO> resultsPaginated = null; PaginationContext paginationContext = new PaginationContext(10); resultsPaginated = auditoriaService.findByObjectId(new Long(2), "2", new Date(0), new Date(), paginationContext); Assert.assertEquals(resultsPaginated.size(), 1); }