SimpleAliasRegistry implements AliasRegistry { @Override public String resolve(String connection, String alias) { return resolve(alias); } SimpleAliasRegistry();  SimpleAliasRegistry(Map<String, String> aliasMap); void register(String alias, String address); @Override boolean canResolve(String connection, String alias); @Override String resolve(String connection, String alias); @Override boolean canResolve(String alias); @Override String resolve(String alias);  }
@Test public void resolve_unknownAlias_throws() { SimpleAliasRegistry registry = new SimpleAliasRegistry(); assertThatThrownBy(() -> registry.resolve(ALIAS)) .isInstanceOf(NoSuchElementException.class); }