    @Test
    public void testSetNodeProperty() throws Exception {

        GraphDatabaseService db = setUpDb();
        NodeManager nodeManager = new NodeManager();
        NodeManager.globalNodeCache.invalidateAll();
        DataNodeManager.dataCache.invalidateAll();
        DataNodeManager dataNodeManager = new DataNodeManager();

        // Write some nodes to the database
        Transaction tx1 = db.beginTx();
        Node a = nodeManager.getOrCreateNode(dataNodeManager, "a", db);
        tx1.success();
        Assert.assertNotNull(a);

        String expected = "success";
        nodeManager.setNodeProperty(a.getId(), "test", expected, db);
        Transaction tx = db.beginTx();
        String actual = (String)NodeManager.getNodeFromGlobalCache(a.getId()).get("test");
        tx.success();

        Assert.assertEquals(expected, actual);
    }