code: public void cleanDatabase() {
          lockingMechanism.writeLock().lock();
          try {
              for (ODocument edge : graph.browseEdges()) {
                  edge.delete();
              }
              for (ODocument node : graph.browseVertices()) {
                  node.delete();
              }
          } finally {
              lockingMechanism.writeLock().unlock();
          }
      }
docs: Deletes all edges and nodes from the graph database. This method is used in the tests to have at every test the
  same start situation.