### Question:
ObjectContainer { public <T, ET> void addAlias( String newLabel, Class<? super T> newType, String existingLabel, Class<? super ET> existingType) { factories.put(new Key(newType, newLabel), () -> get(existingType, existingLabel)); }  void add(T singleton); void add(Class<T> type); void add(String label, Class<? super T> type, T singleton); void add(String label, Class<? super T> type, Class<?> actual); void addAlias(
      String newLabel,
      Class<? super T> newType,
      String existingLabel,
      Class<? super ET> existingType); void add(String label, Lazy<T> lazyValue); T get(Class<T> type); T get(Class<T> type, String label);  }### Answer:
@Test public void addAliasTest() { final ObjectContainer container = new ObjectContainer(); container.add("label-1", InterfaceA.class, TestClass.class); container.addAlias("label-2", InterfaceB.class, "label-1", InterfaceA.class); assertThat( container.get(InterfaceB.class, "label-2"), theInstance(container.get(InterfaceA.class, "label-1"))); }