IndexedObjectContainer implements ObjectIndexProvider { public boolean containsObject( @Nonnull IdentifiableObject object ) { return objectsIndexMap.containsKey( object ); }  @Nonnull @Override Integer mergeObjectIndex( @Nonnull IdentifiableObject object ); boolean containsObject( @Nonnull IdentifiableObject object );  }
@Test public void containsObject() { final Attribute attribute1 = new Attribute(); final Attribute attribute2 = new Attribute(); container.add( attribute1 ); container.add( attribute2 ); Assert.assertTrue( container.containsObject( attribute2 ) ); }