AliasRegistryImpl extends ComponentSupport implements AliasRegistry { @Override public String getAlias(final String name) throws NoSuchAliasException { checkNotNull(name); if (!containsAlias(name)) { throw new NoSuchAliasException(name); } return aliases.get(name); } @Inject  AliasRegistryImpl(final EventManager events); @Override void registerAlias(final String name, final String alias); @Override void removeAlias(final String name); @Override String getAlias(final String name); @Override boolean containsAlias(final String name); @Override Map<String, String> getAliases();  }
@Test public void testGetAliasInvalid() throws Exception { try { underTest.getAlias(null); fail(); } catch (NullPointerException e) { } }