private void encode(String string, boolean isShort) {
   long recordCount = dynamicRecordsInUse();
   Node node = graphdb.getGraphDatabaseService().createNode();
   node.setProperty("key", string);
   newTx();
   if (isShort) {
     assertEquals(recordCount, dynamicRecordsInUse());
   } else {
     assertTrue(recordCount < dynamicRecordsInUse());
   }
   graphdb.clearCache();
   assertEquals(string, node.getProperty("key"));
 }
 public void commit() {
   tx.success();
   graphdb.clearCache();
 }