ServicioAuditoriaImpl implements AuditoriaService { public AppAuditoriaVO getAppAuditoria(String appDescripion) { AppAuditoriaVO app = null; try { app = auditoriaManager.getIdAplicacion(appDescripion); } catch (Exception e) { auditoriaExceptionHandler.handleException(e, ExceptionMessageConstans.ERROR_GETAPP); } if (app == null) { auditoriaExceptionHandler.handleException(new AuditoriaException( ExceptionMessageConstans.ERROR_APP_NOT_FOUND), ExceptionMessageConstans.ERROR_APP_NOT_FOUND); } return app; }  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 testGetIdAplicacion(){ try{ AppAuditoriaVO app = auditoriaService.getAppAuditoria("e"); Assert.fail(); }catch(AuditoriaException e){ } AppAuditoriaVO app = auditoriaService.getAppAuditoria("app1"); Assert.assertEquals(app.getAppId(), new Long(1)); }