ElementImpl implements Element { @Override public ColumnIterable getAttributeColumns() { return getColumnStore(); } ElementImpl(Object id, GraphStore graphStore); @Override Object getId(); @Override String getLabel(); @Override Object getAttribute(String key); @Override Object getAttribute(Column column); @Override Object getAttribute(String key, double timestamp); @Override Object getAttribute(Column column, double timestamp); @Override Object getAttribute(String key, Interval interval); @Override Object getAttribute(Column column, Interval interval); @Override Object getAttribute(String key, GraphView view); @Override Object getAttribute(Column column, GraphView view); @Override Object[] getAttributes(); @Override Set<String> getAttributeKeys(); @Override ColumnIterable getAttributeColumns(); @Override Object removeAttribute(String key); @Override Object removeAttribute(Column column); @Override Object removeAttribute(Column column, double timestamp); @Override Object removeAttribute(String key, double timestamp); @Override Object removeAttribute(Column column, Interval interval); @Override Object removeAttribute(String key, Interval interval); @Override void setLabel(String label); @Override void setAttribute(String key, Object value); @Override void setAttribute(Column column, Object value); @Override void setAttribute(String key, Object value, double timestamp); @Override void setAttribute(Column column, Object value, double timestamp); @Override void setAttribute(String key, Object value, Interval interval); @Override void setAttribute(Column column, Object value, Interval interval); @Override boolean addTimestamp(double timestamp); @Override boolean addInterval(Interval interval); @Override boolean removeTimestamp(double timestamp); @Override boolean removeInterval(Interval interval); @Override double[] getTimestamps(); @Override Interval[] getIntervals(); @Override boolean hasTimestamp(double timestamp); @Override boolean hasInterval(Interval interval); @Override Iterable<Map.Entry> getAttributes(Column column); @Override void clearAttributes(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testGetAttributeColumnsEmpty() { GraphStore store = new GraphStore(); NodeImpl node = new NodeImpl("0", store); Iterable<Column> pk = node.getAttributeColumns(); Assert.assertNotNull(pk); Iterator<Column> itr = pk.iterator(); Assert.assertNotNull(itr); int size = 0; for (; itr.hasNext();) { Column c = itr.next(); Assert.assertTrue(c.isProperty()); size++; } Assert.assertTrue(size == getElementPropertiesLength()); }
@Test public void testGetAttributeColumns() { GraphStore store = new GraphStore(); Column column = generateBasicColumn(store); NodeImpl node = new NodeImpl("0", store); ColumnIterable ci = node.getAttributeColumns(); Assert.assertTrue(ci.toList().contains(column)); Assert.assertEquals(ci.toList().size(), 1 + getElementPropertiesLength()); }