@Test
public void testTransactionalOfferAndPollWithTimeout() throws InterruptedException {
final String item = "offered";
final String name = randomString();
final TransactionContext context = client.newTransactionContext();
context.beginTransaction();
TransactionalQueue<String> txnQueue = context.getQueue(name);
assertTrue(txnQueue.offer(item));
assertEquals(1, txnQueue.size());
assertEquals(item, txnQueue.poll(5, TimeUnit.SECONDS));
context.commitTransaction();