### Question:
BeaconRestApiOptions { public List<String> getRestApiHostAllowlist() { return restApiHostAllowlist; }  int getRestApiPort(); boolean isRestApiDocsEnabled(); boolean isRestApiEnabled(); String getRestApiInterface(); List<String> getRestApiHostAllowlist();  }### Answer:
@Test public void restApiHostAllowlist_shouldNotRequireAValue() { final GlobalConfiguration globalConfiguration = getGlobalConfigurationFromArguments("--rest-api-host-allowlist"); assertThat(globalConfiguration.getRestApiHostAllowlist()).isEmpty(); }
@Test public void restApiHostAllowlist_shouldSupportAllowingMultipleHosts() { final GlobalConfiguration globalConfiguration = getGlobalConfigurationFromArguments("--rest-api-host-allowlist", "my.host,their.host"); assertThat(globalConfiguration.getRestApiHostAllowlist()).containsOnly("my.host", "their.host"); }
@Test public void restApiHostAllowlist_shouldSupportAllowingAllHosts() { final GlobalConfiguration globalConfiguration = getGlobalConfigurationFromArguments("--rest-api-host-allowlist", "*"); assertThat(globalConfiguration.getRestApiHostAllowlist()).containsOnly("*"); }
@Test public void restApiHostAllowlist_shouldDefaultToLocalhost() { assertThat(getGlobalConfigurationFromArguments().getRestApiHostAllowlist()) .containsOnly("localhost", "127.0.0.1"); }