@PostConstruct
  public void validateAndSetDefaults() {
    if (clusters != null) {
      validateClusterNames();
      flattenClusterProperties();
      setMetricsDefaults();
    }
  }
@Test
  void ifOnlyOneClusterProvidedNameIsOptionalAndSetToDefault() {
    ClustersProperties properties = new ClustersProperties();
    properties.getClusters().add(new ClustersProperties.Cluster());

    properties.validateAndSetDefaults();

    assertThat(properties.getClusters())
        .element(0)
        .extracting("name")
        .isEqualTo("Default");
  }