@Override
  public void accept(Props props) {
    if (isClusterEnabled(props)) {
      checkClusterProperties(props);
    }
  }
@Test
  public void accept_throws_MessageException_if_a_cluster_forbidden_property_is_defined_in_a_cluster_search_node() {
    TestAppSettings settings = new TestAppSettings(of(
      CLUSTER_ENABLED.getKey(), "true",
      CLUSTER_NODE_TYPE.getKey(), "search",
      "sonar.search.host", "localhost"));
    Props props = settings.getProps();
    ClusterSettings clusterSettings = new ClusterSettings(network);

    assertThatThrownBy(() -> clusterSettings.accept(props))
      .isInstanceOf(MessageException.class)
      .hasMessage("Properties [sonar.search.host] are not allowed when running SonarQube in cluster mode.");
  }