ImmutableSourceAddressPlaceholder implements SourceAddressPlaceholder { @Override public Optional<String> resolve(final String input, final String name) { return supports(name) ? Optional.of(input) : Optional.empty(); } private  ImmutableSourceAddressPlaceholder(); @Override String getPrefix(); @Override List<String> getSupportedNames(); @Override boolean supports(final String name); @Override Optional<String> resolve(final String input, final String name);  }
@Test public void testReplaceTopic() { assertThat(ImmutableSourceAddressPlaceholder.INSTANCE.resolve(SOME_MQTT_TOPIC, "address")).contains(SOME_MQTT_TOPIC); }
@Test public void testResultIsEmptyForUnknownPlaceholder() { assertThat(ImmutableSourceAddressPlaceholder.INSTANCE.resolve(SOME_MQTT_TOPIC, "invalid")).isEmpty(); }