@Test
  public void testLoadFromDelimitedString() {
    Settings settings =
        settingsBuilder().loadFromDelimitedString("key1=value1;key2=value2", ';').build();
    assertThat(settings.get("key1"), equalTo("value1"));
    assertThat(settings.get("key2"), equalTo("value2"));
    assertThat(settings.getAsMap().size(), equalTo(2));
    assertThat(settings.toDelimitedString(';'), equalTo("key1=value1;key2=value2;"));

    settings = settingsBuilder().loadFromDelimitedString("key1=value1;key2=value2;", ';').build();
    assertThat(settings.get("key1"), equalTo("value1"));
    assertThat(settings.get("key2"), equalTo("value2"));
    assertThat(settings.getAsMap().size(), equalTo(2));
    assertThat(settings.toDelimitedString(';'), equalTo("key1=value1;key2=value2;"));
  }
 public static void assertSettings(
     Settings left, Settings right, boolean checkClusterUniqueSettings) {
   Set<Map.Entry<String, String>> entries0 = left.getAsMap().entrySet();
   Map<String, String> entries1 = right.getAsMap();
   assertThat(
       "--> left:\n"
           + left.toDelimitedString('\n')
           + "\n-->right:\n"
           + right.toDelimitedString('\n'),
       entries0.size(),
       equalTo(entries1.size()));
   for (Map.Entry<String, String> entry : entries0) {
     if (clusterUniqueSettings.contains(entry.getKey()) && checkClusterUniqueSettings == false) {
       continue;
     }
     assertThat(entries1, hasEntry(entry.getKey(), entry.getValue()));
   }
 }