private static String getProperty(String name, Configuration configuration) {
    return Optional.of(configuration.getStringArray(relaxPropertyName(name)))

        .filter(values -> values.length > 0)

        .map(Arrays::stream)

        .map(stream -> stream.collect(Collectors.joining(",")))

        .orElse(null);
  }
@Test
  public void assertPropertiesFromFSSpec() {
    Map<String, String> configs = new HashMap<>();
    configs.put("config.property.1", "val1");
    configs.put("config.property.2", "val2");
    configs.put("config.property.3", "val3");

    PinotFSSpec pinotFSSpec = new PinotFSSpec();
    pinotFSSpec.setConfigs(configs);

    PinotConfiguration pinotConfiguration = new PinotConfiguration(pinotFSSpec);

    Assert.assertEquals(pinotConfiguration.getProperty("config.property.1"), "val1");
    Assert.assertEquals(pinotConfiguration.getProperty("config.property.2"), "val2");
    Assert.assertEquals(pinotConfiguration.getProperty("config.property.3"), "val3");

    // Asserts no error occurs when no configuration is provided in the spec.
    new PinotConfiguration(new PinotFSSpec());
  }