staticMethod = cflowAspect.getDeclaredMethod("isInCflowBelow", new Class[0]);
b = (Boolean) staticMethod.invoke(null, new Object[0]);
assertFalse(b.booleanValue());
final AbstractCflowSystemAspect cflow = (AbstractCflowSystemAspect)cflowAspect.newInstance();
assertFalse(cflow.inCflow());
assertFalse(cflow.inCflowBelow());
Thread t = new Thread() {
public void run() {
System.out.println(Thread.currentThread());
cflow.enter();
assertTrue(cflow.inCflow());
assertTrue( ! cflow.inCflowBelow());
cflow.enter();
assertTrue(cflow.inCflow());
assertFalse( ! cflow.inCflowBelow());
cflow.exit();
// leave the cflow in "inCflow" state is in this thread
}
};
t.start();
System.out.println(Thread.currentThread());
assertFalse(cflow.inCflow());
assertFalse(cflow.inCflowBelow());
}