public void annotation_has_value()
{
ObjectProvider provider = mockObjectProvider();
ObjectLocator locator = mockObjectLocator();
Inject annotation = newMock(Inject.class);
ClassTransformation ct = mockClassTransformation();
MutableComponentModel model = mockMutableComponentModel();
Request injected = mockRequest();
train_findFieldsWithAnnotation(ct, Inject.class, "myfield");
train_getFieldAnnotation(ct, "myfield", Inject.class, annotation);
train_getFieldType(ct, "myfield", WEBREQUEST_CLASS_NAME);
train_toClass(ct, WEBREQUEST_CLASS_NAME, Request.class);
expect(provider.provide(eq(Request.class), isA(AnnotationProvider.class), eq(locator)))
.andReturn(injected);
ct.injectField("myfield", injected);
ct.claimField("myfield", annotation);
replay();
InjectWorker worker = new InjectWorker(provider, locator);