DbClient dbClient = mock(DbClient.class);
when(dbClient.openSession(false)).thenReturn(session);
when(dbClient.componentDao()).thenReturn(componentDao);
when(dbClient.resourceDao()).thenReturn(resourceDao);
when(dbClient.propertiesDao()).thenReturn(propertiesDao);
when(dbClient.measureDao()).thenReturn(measureDao);
project = ComponentTesting.newProjectDto()
.setId(1L)
.setName("SonarQube")
.setLongName("SonarQube")