in BoltsTest/src/bolts/TaskTest.java [180:196]
public void testBackgroundError() {
runTaskTest(new Callable<Task<?>>() {
public Task<?> call() throws Exception {
return Task.callInBackground(new Callable<Integer>() {
public Integer call() throws Exception {
throw new IllegalStateException();
}
}).continueWith(new Continuation<Integer, Void>() {
public Void then(Task<Integer> task) {
assertTrue(task.isFaulted());
assertTrue(task.getError() instanceof IllegalStateException);
return null;
}
});
}
});
}