boolean set1 = false;
boolean set2 = false;
boolean set3 = false;
for (Object o : evs) {
ExternalValue ev = (ExternalValue) o;
assertNotNull(ev.getValue());
if (ev.getValue().equals(myNull)) {
// OK; should be the source of two 'set' nodes
assertFalse(set1);
assertEquals(2, ev.getOutFlows().size());
assertEquals(0, ev.getInFlows().size());
assertInstanceOf(SetNode.class, ev.getOutFlows().get(0).getTo());
assertInstanceOf(SetNode.class, ev.getOutFlows().get(1).getTo());
assertNotSame(ev.getOutFlows().get(0).getTo(), ev.getOutFlows().get(1).getTo());
set1 = true;
} else if (ev.getValue().equals(email)) {
// OK; should be the target of a 'set' node
assertFalse(set2);
assertEquals(1, ev.getInFlows().size());
assertEquals(0, ev.getOutFlows().size());
assertInstanceOf(SetNode.class, ev.getInFlows().get(0).getFrom());
set2 = true;
} else if (ev.getValue().equals(password)) {
// OK; should be the target of a 'set' node
assertFalse(set3);
assertEquals(1, ev.getInFlows().size());
assertEquals(0, ev.getOutFlows().size());
assertInstanceOf(SetNode.class, ev.getInFlows().get(0).getFrom());
set3 = true;
} else {
fail("Unknown ExternalValue: " + ev.getValue() + " in ExternalValue: " + ev);
}
}
assertTrue("'null' was never retrieved", set1);
assertTrue("'current email' was never reset", set2);