/* One FQN only. */
doPutTests(new Fqn<String>("key"));
doRemoveTests(new Fqn<String>("key"));
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
MarshalledValueOutputStream os = new MarshalledValueOutputStream(baos);
loader.loadEntireState(os);
os.close();
/* Add three FQNs, middle FQN last. */
doPutTests(new Fqn<String>("key1"));
doPutTests(new Fqn<String>("key3"));
doPutTests(new Fqn<String>("key2"));
assertEquals(4, loader.get(new Fqn<String>("key1")).size());
assertEquals(4, loader.get(new Fqn<String>("key2")).size());
assertEquals(4, loader.get(new Fqn<String>("key3")).size());
/* Remove middle FQN first, then the others. */
doRemoveTests(new Fqn<String>("key2"));
doRemoveTests(new Fqn<String>("key3"));
doRemoveTests(new Fqn<String>("key1"));
assertEquals(null, loader.get(new Fqn<String>("key1")));
assertEquals(null, loader.get(new Fqn<String>("key2")));
assertEquals(null, loader.get(new Fqn<String>("key3")));
baos = new ByteArrayOutputStream(1024);
os = new MarshalledValueOutputStream(baos);
loader.loadEntireState(os);
os.close();
stopLoader();
}