TypedIndexedObjectContainer implements ObjectIndexProvider { @Nonnull public IndexedObjectContainer getTypedContainer( @Nonnull Class<? extends IdentifiableObject> c ) { return typedIndexedObjectContainers.computeIfAbsent( c, key -> new IndexedObjectContainer() ); }  @Nonnull IndexedObjectContainer getTypedContainer( @Nonnull Class<? extends IdentifiableObject> c ); @Nonnull @Override Integer mergeObjectIndex( @Nonnull IdentifiableObject object ); boolean containsObject( @Nonnull IdentifiableObject object ); void add( @Nonnull IdentifiableObject identifiableObject );  }
@Test public void getContainerNew() { IndexedObjectContainer container1 = container.getTypedContainer( Attribute.class ); Assert.assertSame( container1, container.getTypedContainer( Attribute.class ) ); IndexedObjectContainer container2 = container.getTypedContainer( Category.class ); Assert.assertSame( container2, container.getTypedContainer( Category.class ) ); Assert.assertNotSame( container1, container2 ); Assert.assertSame( container1, container.getTypedContainer( Attribute.class ) ); }