@Test public void testHappyPath1() { ChannelUtils.put(channel, events.get(0)); Assert.assertTrue(channel.wasLastTransactionCommitted()); Assert.assertFalse(channel.wasLastTransactionRolledBack()); Assert.assertTrue(channel.wasLastTransactionClosed()); }
public static void put(final Channel channel, final Event event) throws ChannelException { transact(channel, new Runnable() { @Override public void run() { channel.put(event); } }); }
ChannelUtils { public static void put(final Channel channel, final Event event) throws ChannelException { transact(channel, new Runnable() { @Override public void run() { channel.put(event); } }); } }
ChannelUtils { public static void put(final Channel channel, final Event event) throws ChannelException { transact(channel, new Runnable() { @Override public void run() { channel.put(event); } }); } private  ChannelUtils(); }
ChannelUtils { public static void put(final Channel channel, final Event event) throws ChannelException { transact(channel, new Runnable() { @Override public void run() { channel.put(event); } }); } private  ChannelUtils(); static void put(final Channel channel, final Event event); static void put(final Channel channel, final Collection<Event> events); static Event take(final Channel channel); static List<Event> take(final Channel channel, final int max); static void transact(Channel channel, Runnable transactor); static T transact(Channel channel, Callable<T> transactor); }
ChannelUtils { public static void put(final Channel channel, final Event event) throws ChannelException { transact(channel, new Runnable() { @Override public void run() { channel.put(event); } }); } private  ChannelUtils(); static void put(final Channel channel, final Event event); static void put(final Channel channel, final Collection<Event> events); static Event take(final Channel channel); static List<Event> take(final Channel channel, final int max); static void transact(Channel channel, Runnable transactor); static T transact(Channel channel, Callable<T> transactor);  }