@Test
public void injection_provider_threw_exception()
{
ObjectLocator locator = mockObjectLocator();
InjectionProvider ip = newMock(InjectionProvider.class);
Inject annotation = newInject();
ClassTransformation ct = mockClassTransformation();
MutableComponentModel model = mockMutableComponentModel();
RuntimeException failure = new RuntimeException("Oops.");
train_findFieldsWithAnnotation(ct, Inject.class, "myfield");
train_getFieldAnnotation(ct, "myfield", Inject.class, annotation);
train_getFieldType(ct, "myfield", REQUEST_CLASS_NAME);
train_toClass(ct, REQUEST_CLASS_NAME, Request.class);
expect(ip.provideInjection("myfield", Request.class, locator, ct, model)).andThrow(failure);
train_getClassName(ct, "foo.bar.Baz");
replay();