### Question:
ElementImpl implements Element { @Override public Object getAttribute(String key) { return getAttribute(checkColumnExists(key)); } 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);  }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetAttributeKeyUnknown() { GraphStore store = new GraphStore(); NodeImpl node = new NodeImpl("0", store); node.getAttribute("foo"); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetAttributeUnknownColumn() { GraphStore store = new GraphStore(); ColumnImpl columnImpl = new ColumnImpl("0", String.class, "title", "", Origin.DATA, false, false); NodeImpl node = new NodeImpl("0", store); node.getAttribute(columnImpl); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetAttributeOtherStoreColumn() { GraphStore otherStore = new GraphStore(); Column column = generateBasicColumn(otherStore); GraphStore store = new GraphStore(); NodeImpl node = new NodeImpl("0", store); node.getAttribute(column); }
@Test public void testGetAttributeTimestampColumnNull() { GraphStore store = new GraphStore(); Column column = generateTimestampColumn(store); NodeImpl node = new NodeImpl("0", store); Assert.assertNull(node.getAttribute(column, 1.0)); }
@Test public void testGetAttributeIntervalColumnNull() { GraphStore store = getIntervalGraphStore(); Column column = generateIntervalColumn(store); NodeImpl node = new NodeImpl("0", store); Assert.assertNull(node.getAttribute(column, new Interval(1.0, 2.0))); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetAttributeTimestampStringUnknown() { GraphStore store = new GraphStore(); NodeImpl node = new NodeImpl("0", store); node.getAttribute("foo", 1.0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetAttributeIntervalStringUnknown() { GraphStore store = new GraphStore(); NodeImpl node = new NodeImpl("0", store); node.getAttribute("foo", new Interval(1.0, 2.0)); }