}
};
stubPassingField(field, mock(JClassType.class), "field");
JClassType ownerTypeParent = mock(JClassType.class);
Set<? extends JClassType> ownerTypeFlattenedSupertypeHierarchy = new HashSet<JClassType>(
Arrays.asList(ownerType, ownerTypeParent));
doReturn(ownerTypeFlattenedSupertypeHierarchy).when(ownerType).getFlattenedSupertypeHierarchy();
when(ownerType.getFields()).thenReturn(new JField[] { ownerTypeField1, ownerTypeField2 });
when(ownerTypeParent.getFields()).thenReturn(new JField[] { ownerTypeParentField });
when(ownerType.getName()).thenReturn("OwnerTypeName");
JClassType ownerTypeParentFieldType = mock(JClassType.class, "ownerTypeParentFieldType");
stubPassingField(ownerTypeField1, mock(JClassType.class), "ownerTypeField1");
stubPassingField(ownerTypeField2, mock(JClassType.class), "ownerTypeField2");
stubPassingField(ownerTypeParentField, ownerTypeParentFieldType, "ownerTypeParentField");
Set<? extends JClassType> ownerTypeParentFieldTypeFlattenedSupertypeHierarchy = new HashSet<JClassType>(
Arrays.asList(ownerTypeParentFieldType));
doReturn(ownerTypeParentFieldTypeFlattenedSupertypeHierarchy).when(ownerTypeParentFieldType)
.getFlattenedSupertypeHierarchy();
when(ownerTypeParentFieldType.getFields()).thenReturn(new JField[] {
ownerTypeParentFieldTypeSubField1, ownerTypeParentFieldTypeSubField2 });
stubPassingField(ownerTypeParentFieldTypeSubField1, ownerTypeParentFieldTypeSubField1Type,
"ownerTypeParentFieldTypeSubField1");
stubPassingField(ownerTypeParentFieldTypeSubField2, mock(JClassType.class),