public static void main(String[] args) {
int n = 40;
FibTest eagerTest = new FibTest(n);
LongProperty eagerResult = new SimpleLongProperty();
eagerTest.setupFor(eagerResult);
FibTest lazyTest = new FibTest(n);
org.reactfx.inhibeans.property.SimpleLongProperty lazyResult =
new org.reactfx.inhibeans.property.SimpleLongProperty();
lazyTest.setupFor(lazyResult);
long t1 = System.currentTimeMillis();
eagerTest.run();
long t2 = System.currentTimeMillis();
double eagerTime = (t2-t1)/1000.0;
t1 = System.currentTimeMillis();
Guard g = lazyResult.block();
lazyTest.run();
g.close();
t2 = System.currentTimeMillis();
double lazyTime = (t2-t1)/1000.0;
System.out.println("EAGER TEST:");
System.out.println(" fib_" + n + " = " + eagerResult.get());
System.out.println(" result invalidations: " + eagerTest.invalidationCount);
System.out.println(" duration: " + eagerTime + " seconds");
System.out.println();
System.out.println("LAZY TEST:");
System.out.println(" fib_" + n + " = " + lazyResult.get());