### Question:
UriInfoImpl implements UriInfo { public UriInfoImpl addAlias(final AliasQueryOption alias) { if (aliases.containsKey(alias.getName())) { throw new ODataRuntimeException("Alias " + alias.getName() + " is already there."); } else { aliases.put(alias.getName(), alias); } return this; }  UriInfoImpl setKind(final UriInfoKind kind); @Override UriInfoKind getKind(); @Override UriInfoAll asUriInfoAll(); @Override UriInfoBatch asUriInfoBatch(); @Override UriInfoCrossjoin asUriInfoCrossjoin(); @Override UriInfoEntityId asUriInfoEntityId(); @Override UriInfoService asUriInfoService(); @Override UriInfoMetadata asUriInfoMetadata(); @Override UriInfoResource asUriInfoResource(); UriInfoImpl addEntitySetName(final String entitySet); @Override List<String> getEntitySetNames(); UriInfoImpl setEntityTypeCast(final EdmEntityType type); @Override EdmEntityType getEntityTypeCast(); UriInfoImpl addResourcePart(final UriResource uriPathInfo); UriResource getLastResourcePart(); @Override List<UriResource> getUriResourceParts(); UriInfoImpl setQueryOption(final QueryOption option); UriInfoImpl setSystemQueryOption(final SystemQueryOption systemOption); @Override ExpandOption getExpandOption(); @Override FilterOption getFilterOption(); @Override FormatOption getFormatOption(); @Override IdOption getIdOption(); @Override CountOption getCountOption(); @Override OrderByOption getOrderByOption(); @Override SearchOption getSearchOption(); @Override SelectOption getSelectOption(); @Override SkipOption getSkipOption(); @Override SkipTokenOption getSkipTokenOption(); @Override TopOption getTopOption(); @Override ApplyOption getApplyOption(); @Override List<SystemQueryOption> getSystemQueryOptions(); UriInfoImpl addAlias(final AliasQueryOption alias); @Override String getValueForAlias(final String alias); Map<String, AliasQueryOption> getAliasMap(); @Override List<AliasQueryOption> getAliases(); UriInfoImpl addCustomQueryOption(final CustomQueryOption option); @Override List<CustomQueryOption> getCustomQueryOptions(); UriInfoImpl setFragment(final String fragment); @Override String getFragment(); @Override DeltaTokenOption getDeltaTokenOption();  }### Answer:
@Test(expected = ODataRuntimeException.class) public void doubleAlias() { final AliasQueryOption alias = (AliasQueryOption) new AliasQueryOptionImpl().setName("A"); new UriInfoImpl() .addAlias(alias) .addAlias(alias); }