### Question:
LinkSettingsUtils { public static Map<String, Object> flattenSettings(Map<String, Object> settings) { return flattenSettings("", settings); }  static Map<String, Object> flattenSettings(Map<String, Object> settings); static Optional<IlpOverHttpLinkSettings.AuthType> getIncomingAuthType(Map<String, Object> customSettings); static Optional<IlpOverHttpLinkSettings.AuthType> getOutgoingAuthType(Map<String, Object> customSettings); static void validate(AuthenticatedLinkSettings linkSettings);  }### Answer:
@Test public void flattenSettingsAlreadyFlattened() { assertThat(LinkSettingsUtils.flattenSettings(flattenedSettings)).isEqualTo(flattenedSettings); }
@Test public void flattenSettings() { Map<String, Object> grandsonSettings = ImmutableMap.of("name", "fizz", "age", 15); Map<String, Object> grandDaughterSettings = ImmutableMap.of("name", "buzz", "age", 20); Map<String, Object> sonSettings = ImmutableMap.of("name", "bar", "age", 50, "grandson", grandsonSettings, "granddaughter", grandDaughterSettings); Map<String, Object> parentSettings = ImmutableMap.of("name", "foo", "age", 100, "son", sonSettings); Map<String, Object> settings = ImmutableMap.of("parent", parentSettings); assertThat(LinkSettingsUtils.flattenSettings(settings)).isEqualTo(flattenedSettings); }