public void validateUserHasAdministerIssuesPermission(String projectUuid) {
    try (DbSession dbSession = dbClient.openSession(false)) {
      String userUuid = Objects.requireNonNull(userSession.getUuid());
      if (!dbClient.authorizationDao().selectEntityPermissions(dbSession, projectUuid, userUuid).contains(ISSUE_ADMIN)){
        throw insufficientPrivilegesException();
      }
    }
  }
@Test
  public void givenUserHasAdministerIssuesPermission_whenValidateUserHasAdministerIssuesPermission_thenDoNothing() {
    // given
    String userUuid = "userUuid";
    doReturn(userUuid).when(userSession).getUuid();
    String projectUuid = "projectUuid";
    DbSession dbSession = mockDbSession();
    AuthorizationDao authorizationDao = mockAuthorizationDao();
    doReturn(Set.of("permission1", ISSUE_ADMIN)).when(authorizationDao).selectEntityPermissions(dbSession, projectUuid, userUuid);

    // when, then
    assertThatCode(() -> underTest.validateUserHasAdministerIssuesPermission(projectUuid))
      .doesNotThrowAnyException();
    verify(dbClient, times(1)).authorizationDao();
  }