public void testReactor() throws Exception {
System.out.println("R");
new Plant();
try {
final Reactor reactor = new NonBlockingReactor();
final MyCloseable mac1 = new MyCloseable();
final MyCloseable mac2 = new MyCloseable();
final MyCloseable mac3 = new MyCloseable();
final MyCloseable mac4 = new MyCloseable();
final MyFailedCloseable mfac = new MyFailedCloseable();
reactor.addCloseable(mac1);
reactor.addCloseable(mac2);
reactor.addCloseable(mac3);
reactor.addCloseable(mac4);
reactor.addCloseable(mfac);
reactor.removeCloseable(mac4);
reactor.close();
assertEquals(mac1.closed, 1);
assertEquals(mac2.closed, 1);
assertEquals(mac3.closed, 1);
assertEquals(mac4.closed, 0);