Assert.assertEquals(msg, msgsResult.get(0));
final CountDownLatch latch2 = new CountDownLatch(1);
// Adding the Task after the exception should still throw an exception
ctx.executeOnCompletion(new IOAsyncTask()
{
public void onError(final int errorCode, final String errorMessage)
{
lastError.set(errorCode);
msgsResult.add(errorMessage);