ServicioAuditoriaImpl implements AuditoriaService { public List<TrazaAuditoriaVO> findByCriteria(CriteriaVO criteria) { 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 testFindByCriteria() { CriteriaVO criteria = new CriteriaVO(); FilterVO filter = new FilterVO(); filter.setField(CamposTrazaAuditoriaConstants.APP_ID_FIELD); filter.setOperator(OperatorEnum.ES_IGUAL); filter.setValue("1"); filter.setJdbcType(JdbcTypesEnum.BIG_INT); FilterVO filter2 = new FilterVO(); filter2.setField(CamposTrazaAuditoriaConstants.USER_NAME_FIELD); filter2.setOperator(OperatorEnum.NO_ES_IGUAL); filter2.setValue("1"); FilterVO filter3 = new FilterVO(); filter2.setField(CamposTrazaAuditoriaConstants.USER_ID_FIELD); filter2.setOperator(OperatorEnum.NO_ES_IGUAL); filter2.setValue("3"); List<FilterVO> filters = new LinkedList<FilterVO>(); filters.add(filter); filters.add(filter2); criteria.setFilters(filters); List<TrazaAuditoriaVO> list = auditoriaService.findByCriteria(criteria); Assert.assertEquals(list.size(), 1); }