public long getLinesOfCode(){
    try (DbSession dbSession = dbClient.openSession(false)) {
      return dbClient.projectDao().getNclocSum(dbSession);
    }
  }
@Test
  public void should_return_metric_from_liveMeasureDao() {
    when(dbClient.projectDao().getNclocSum(any(DbSession.class))).thenReturn(1800999L);

    long linesOfCode = statisticsSupport.getLinesOfCode();

    assertThat(linesOfCode).isEqualTo(1800999L);
  }