MultiAttributeProvider extends AbstractAttributeProvider { @Pure @Override public Collection<Attribute> getAllAttributes() { final List<Attribute> list = new ArrayList<>(getAttributeCount()); Attribute newAttr; for (final String name : getAllAttributeNames()) { if (name != null) { newAttr = extract(name); if (newAttr != null) { list.add(newAttr); } } } return list; }  @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 testGetAllAttributes() throws Exception { Collection<Attribute> attrs = this.container.getAllAttributes(); assertNotNull(attrs); assertEquals(8, attrs.size()); assertEpsilonEquals(Arrays.asList( makeUninitialized("A", AttributeType.BOOLEAN), new AttributeImpl("B", 1), makeUninitialized("C", AttributeType.URL), makeUninitialized("D", AttributeType.STRING), makeUninitialized("E", AttributeType.OBJECT), makeUninitialized("Z1", AttributeType.STRING), makeUninitialized("Z2", AttributeType.STRING), makeUninitialized("Z3", AttributeType.STRING) ), attrs); }