channel.start();
Assert.assertTrue(channel.isOpen());
fillChannel(channel, "fillup");
// take an event, roll it back, and
// then make sure a put fails
Transaction transaction;
transaction = channel.getTransaction();
transaction.begin();
Event event = channel.take();
Assert.assertNotNull(event);
transaction.rollback();
transaction.close();
// ensure the take the didn't change the state of the capacity
Assert.assertEquals(0, fillChannel(channel, "capacity").size());
// ensure we the events back
Assert.assertEquals(5, takeEvents(channel, 1, 5).size());
}