//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testAddCacheCleared()
        public virtual void TestAddCacheCleared()
        {
            Node nodeA = GraphDb.createNode();

            nodeA.SetProperty("1", 1);
            Node         nodeB = GraphDb.createNode();
            Relationship rel   = nodeA.CreateRelationshipTo(nodeB, MyRelTypes.TEST);

            rel.SetProperty("1", 1);
            Commit();
            NewTransaction();
            nodeA.CreateRelationshipTo(nodeB, MyRelTypes.TEST);
            int count = 0;

            foreach (Relationship relToB in nodeA.GetRelationships(MyRelTypes.TEST))
            {
                count++;
            }
            assertEquals(2, count);
            nodeA.SetProperty("2", 2);
            assertEquals(1, nodeA.GetProperty("1"));
            rel.SetProperty("2", 2);
            assertEquals(1, rel.GetProperty("1"));
            // trigger empty load
            GraphDb.getNodeById(nodeA.Id);
            GraphDb.getRelationshipById(rel.Id);
            // apply COW maps
            Commit();
            NewTransaction();
            count = 0;
            foreach (Relationship relToB in nodeA.GetRelationships(MyRelTypes.TEST))
            {
                count++;
            }
            assertEquals(2, count);
            assertEquals(1, nodeA.GetProperty("1"));
            assertEquals(1, rel.GetProperty("1"));
            assertEquals(2, nodeA.GetProperty("2"));
            assertEquals(2, rel.GetProperty("2"));
        }