public void testTransactionalOfferTake() throws InterruptedException {
final String item = "offered";
final String queueName = randomString();
final TransactionContext context = client.newTransactionContext();
context.beginTransaction();
TransactionalQueue<String> txnQueue = context.getQueue(queueName);
assertTrue(txnQueue.offer(item));
assertEquals(1, txnQueue.size());
assertEquals(item, txnQueue.take());
context.commitTransaction();