use of org.neo4j.helpers.ListenSocketAddress in project neo4j by neo4j.
the class ListenAddressSettingsTest method shouldParseExplicitSettingValueWhenProvided.
@Test
public void shouldParseExplicitSettingValueWhenProvided() throws Exception {
// given
Map<String, String> config = stringMap(GraphDatabaseSettings.default_listen_address.name(), "server1.example.com", listen_address_setting.name(), "server1.internal:4000");
// when
ListenSocketAddress listenSocketAddress = listen_address_setting.apply(config::get);
// then
assertEquals("server1.internal", listenSocketAddress.getHostname());
assertEquals(4000, listenSocketAddress.getPort());
}
Aggregations