train_findFieldsWithAnnotation(ct, InjectComponent.class, "myfield");
train_getFieldAnnotation(ct, "myfield", InjectComponent.class, annotation);
train_getFieldType(ct, "myfield", CLASS_NAME);
train_getResourcesFieldName(ct, "resources");
expect(annotation.value()).andReturn("id_provided_as_annotation").atLeastOnce();
ct.makeReadOnly("myfield");
train_extendMethod(ct, TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE,
"myfield = (" + CLASS_NAME + ") resources.getEmbeddedComponent(\"id_provided_as_annotation\");");
replay();