public Visibility get(DbSession dbSession) {
    PropertyDto defaultProjectVisibility = Optional
      .ofNullable(dbClient.propertiesDao().selectGlobalProperty(dbSession, PROJECTS_DEFAULT_VISIBILITY_PROPERTY_NAME))
      .orElseThrow(() -> new IllegalStateException("Could not find default project visibility setting"));
    return Visibility.parseVisibility(defaultProjectVisibility.getValue());
  }
@Test
  public void fail_if_project_visibility_property_not_exist() {
    DbSession dbSession = db.getSession();
    assertThatThrownBy(() -> underTest.get(dbSession))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Could not find default project visibility setting");
  }