List<Event> expected = new ArrayList<Event>();
// now evict the node - which should cause a passivation
eventLog.events.clear();
cache.evict(fqn);
expected.add(new EventImpl(true, cache, null, data, fqn, null, true, null, false, null, NODE_PASSIVATED));
expected.add(new EventImpl(false, cache, null, Collections.emptyMap(), fqn, null, true, null, false, null, NODE_PASSIVATED));
expected.add(new EventImpl(true, cache, null, null, fqn, null, true, null, false, null, NODE_EVICTED));
expected.add(new EventImpl(false, cache, null, null, fqn, null, true, null, false, null, NODE_EVICTED));
assertEquals(expected, eventLog.events);
// now load the node.
expected.clear();
eventLog.events.clear();
cache.get(fqn, "DOES_NOT_EXIST");
expected.add(new EventImpl(true, cache, null, null, fqn, null, true, null, false, null, NODE_CREATED));
expected.add(new EventImpl(false, cache, null, null, fqn, null, true, null, false, null, NODE_CREATED));
expected.add(new EventImpl(true, cache, null, Collections.emptyMap(), fqn, null, true, null, false, null, NODE_ACTIVATED));
expected.add(new EventImpl(false, cache, null, data, fqn, null, true, null, false, null, NODE_ACTIVATED));
expected.add(new EventImpl(true, cache, null, null, fqn, null, true, null, false, null, NODE_VISITED));
expected.add(new EventImpl(false, cache, null, null, fqn, null, true, null, false, null, NODE_VISITED));
assertEquals(expected, eventLog.events);
}