new ExceptionThrowingDatastoreDelegate.BaseExceptionPolicy() {
boolean exploded = false;
protected void doIntercept(String methodName) {
if (!exploded && methodName.equals("Next")) {
exploded = true;
throw new DatastoreFailureException("boom: " + methodName);
}
}
};
ExceptionThrowingDatastoreDelegate dd =
new ExceptionThrowingDatastoreDelegate(getDelegateForThread(), policy);