List<Data> list = new ArrayList<Data>();
list.add(ss.toData("item1"));
list.add(ss.toData("item2"));
final SimpleClient client = getClient();
client.send(new CompareAndRemoveRequest(queueName, list, true));
Boolean result = (Boolean) client.receive();
assertTrue(result);
assertEquals(2, q.size());
client.send(new CompareAndRemoveRequest(queueName, list, false));
result = (Boolean) client.receive();
assertTrue(result);
assertEquals(0, q.size());
}