RepositoryStatisticService { public RepositoryStatistic computeBaseStatistics(Long repositoryId) { logger.debug("Compute text unit counts for repository id: {}", repositoryId); Query createNativeQuery = entityManager.createNamedQuery("RepositoryStatistic.computeBaseStatistics"); createNativeQuery.setParameter(1, repositoryId); RepositoryStatistic repositoryStatistic = (RepositoryStatistic) createNativeQuery.getSingleResult(); updateRepositoryStatisticWithOutOfSla(repositoryId, repositoryStatistic); return repositoryStatistic; }  void updateStatistics(Long repositoryId); RepositoryStatistic computeBaseStatistics(Long repositoryId); RepositoryLocaleStatistic computeLocaleStatistics(RepositoryLocale repositoryLocale);  }
@Test public void testComputeBaseStatistics() throws Exception { TMTestData tmTestData = new TMTestData(testIdWatcher); RepositoryStatistic repositoryStatistic = repositoryStatisticService.computeBaseStatistics(tmTestData.repository.getId()); checkTextUnitCounts(repositoryStatistic); }