@Test
public void testClearElementWithView() {

    GraphStore graphStore = generateBasicGraphStoreWithColumns();
    GraphView view = graphStore.viewStore.createView();
    Graph graph = graphStore.viewStore.getGraph(view);
    Column column = graphStore.nodeTable.store.getColumn("foo");
    Node n1 = graphStore.factory.newNode("1");
    n1.setAttribute(column, "bar");
    graphStore.addNode(n1);
    graph.addNode(n1);
    IndexStore<Node> indexStore = graphStore.nodeTable.store.indexStore;
    IndexImpl index = indexStore.createViewIndex(graphStore.viewStore.getGraph(view));
    n1.clearAttributes();
    Assert.assertEquals(index.countElements(column), 0);
    Assert.assertEquals(index.countValues(column), 0);
    Assert.assertEquals(index.count(column, "bar"), 0);
}