ElementImpl implements Element { @Override public Object[] getAttributes() { return attributes; } 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 testGetAttributes() { NodeImpl nodeImpl = new NodeImpl(0); Assert.assertNotNull(nodeImpl.getAttributes()); }
@Test public void testGetAttributesTimestampEmpty() { GraphStore store = new GraphStore(); Column column = generateTimestampColumn(store); NodeImpl node = new NodeImpl("0", store); Iterator<Map.Entry> itr = node.getAttributes(column).iterator(); Assert.assertFalse(itr.hasNext()); }
@Test public void testGetAttributesIntervalEmpty() { GraphStore store = getIntervalGraphStore(); Column column = generateIntervalColumn(store); NodeImpl node = new NodeImpl("0", store); Iterator<Map.Entry> itr = node.getAttributes(column).iterator(); Assert.assertFalse(itr.hasNext()); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetDynamicAttributesStaticColumn() { GraphStore store = new GraphStore(); Column column = generateBasicColumn(store); NodeImpl node = new NodeImpl("0", store); node.getAttributes(column); }