private void commitReadingWrite(String path, byte[] data, CachingCurator database) {
        NestedTransaction transaction = new NestedTransaction();
        byte[] oldData = database.getData(Path.fromString(path)).get();
        CuratorTransaction curatorTransaction = database.newCuratorTransactionIn(transaction);
        // Add a dummy operation which reads the data and populates the cache during commit of the write.
        curatorTransaction.add(new DummyOperation(() -> assertArrayEquals(oldData, database.getData(Path.fromString(path)).get())));
        curatorTransaction.add(CuratorOperations.setData(path, data));
        transaction.commit();
    }
Tests the curator db directly.
This verifies the details of the current implementation of the database, not just its API;
breaking this does not necessarily mean that a change is wrong.

@author bratseth
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CachingCuratorTest.java