public void testUpdateAsynchronously(ConsistencyLevel cl) throws Exception {
Thing thing = Thing.random();
t.insert(thing);
thing.number = Thing.random().number;
ThingWriteListener listener = new ThingWriteListener();
t.updateAsynchronously(thing, listener, new WriteOptions(cl, RetryPolicy.LOGGING));
listener.await();
if (listener.exception != null) {
throw listener.exception;
}
assertEquals(thing, listener.entities.iterator().next());