loader.remove(Fqn.fromString("/"));
int num;
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
MarshalledValueOutputStream os = new MarshalledValueOutputStream(baos);
loader.loadEntireState(os);
num = baos.size();
}
catch (UnsupportedOperationException ex)
{
log.info("caught unsupported operation exception that's okay: ", ex);
return;
}
Object txnKey = new Object();
List<Modification> mods = createUpdates();
loader.prepare(txnKey, mods, false);
loader.rollback(txnKey);
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
MarshalledValueOutputStream os = new MarshalledValueOutputStream(baos);
loader.loadEntireState(os);
assertEquals(num, baos.size());
}