@Override public Object postProcessAfterInitialization(Object bean, String beanName) { Class<? extends Object> beanClass = bean.getClass(); //XXX: DO NOT remove this method and code as it is required to extract //collaborators before the sut class is proxied down stream. Once the //sut class is proxied we will not be able to access the sut class //fields with ease. testContext.getSutDescriptor().ifPresent(sutDescriptor -> { if (sutDescriptor.isSutClass(beanClass)) { sutDescriptor.setValue(testContext.getTestInstance(), bean); } }); return bean; }