try {
Thread.sleep(100);
} catch (InterruptedException e1) {
// Ignore.
}
data.waitForWaiting();
assertFalse(cb.hasFailed()); // Callback must not have been called yet.
data.proceed(); // Now it will complete encoding, and then report in, and then fail.
try {
cb.waitForFinishedEncode();
assertFalse(true); // Should have failed now.