MultiAttributeProvider extends AbstractAttributeProvider { @Pure @Override public Collection<String> getAllAttributeNames() { if (this.names == null) { final Set<String> names = new TreeSet<>(new AttributeNameStringComparator()); for (final AttributeProvider c : this.containers) { names.addAll(c.getAllAttributeNames()); } this.names = names; } return Collections.unmodifiableSet(this.names); }  @Override void toMap(Map<String, Object> mapToFill); boolean addAttributeContainer(AttributeProvider container); boolean removeAttributeContainer(AttributeProvider container); @Pure int getAttributeContainerCount(); @Pure @Override MultiAttributeProvider clone(); @Override void freeMemory(); @Pure @Override Collection<Attribute> getAllAttributes(); @Pure @Override Map<AttributeType, Collection<Attribute>> getAllAttributesByType(); @Pure @Override AttributeValue getAttribute(String name); @Pure @Override AttributeValue getAttribute(String name, AttributeValue defaultValue); @Pure @Override int getAttributeCount(); @Pure @Override Collection<String> getAllAttributeNames(); @Pure @Override Attribute getAttributeObject(String name); @Pure @Override boolean hasAttribute(String name);  }
@Test public void testGetAllAttributeNames() { Collection<String> names = this.container.getAllAttributeNames(); assertNotNull(names); assertEquals(8, names.size()); assertEpsilonEquals(Arrays.asList( "A", "B", "C", "D", "E", "Z1", "Z2", "Z3" ), names); }