@Test
public void testIndexNode() {

    ColumnStore<Node> columnStore = generateBasicNodeColumnStore();
    IndexStore<Node> indexStore = columnStore.indexStore;
    IndexImpl<Node> mainIndex = indexStore.mainIndex;
    Column col1 = columnStore.getColumn("foo");
    Column col2 = columnStore.getColumn("age");
    NodeImpl n = new NodeImpl("0");
    n.setAttribute(col1, "A");
    n.setAttribute(col2, 20);
    indexStore.index(n);
    Assert.assertEquals(mainIndex.count(col1, "A"), 1);
    Assert.assertEquals(mainIndex.count("foo", "A"), 1);
    Assert.assertEquals(mainIndex.count(col2, 20), 1);
    Assert.assertEquals(mainIndex.count("age", 20), 1);
    Assert.assertEquals(mainIndex.countElements(col1), 1);
    Assert.assertEquals(mainIndex.countElements(col2), 1);
    Assert.assertEquals(mainIndex.countValues(col1), 1);
    Assert.assertEquals(mainIndex.countValues(col2), 1);
    Assert.assertTrue(mainIndex.values(col1).contains("A"));
    Assert.assertTrue(mainIndex.values(col2).contains(20));
    Assert.assertSame(getIterable(mainIndex.get(col1, "A"))[0], n);
    Assert.assertNull(mainIndex.get(col1, "B"));
    Assert.assertSame(getIterable(mainIndex.get("foo", "A"))[0], n);
    Assert.assertNull(mainIndex.get("foo", "B"));
}