@Override
    public void intercept(IMethodInvocation invocation) throws Throwable {
      Object value = field.readValue(invocation.getInstance());
      value = getUltimateTargetObject(value);
      if (value != null) {
        field.writeValue(invocation.getInstance(), value);
      }
      invocation.proceed();
    }
Taken from {@link org.springframework.test.util.AopTestUtils#getUltimateTargetObject(java.lang.Object)}
and copied to provide support for versions earlier then Spring 4.2

Get the ultimate <em>target</em> object of the supplied {@code candidate}
object, unwrapping not only a top-level proxy but also any number of
nested proxies.
<p>If the supplied {@code candidate} is a Spring
{@linkplain AopUtils#isAopProxy proxy}, the ultimate target of all
nested proxies will be returned; otherwise, the {@code candidate}
will be returned <em>as is</em>.
@param candidate the instance to check (potentially a Spring AOP proxy;
never {@code null})
@return the target object or the {@code candidate} (never {@code null})
@throws IllegalStateException if an error occurs while unwrapping a proxy
@see Advised#getTargetSource()
@see org.springframework.aop.framework.AopProxyUtils#ultimateTargetClass
spock-spring/src/main/java/org/spockframework/spring/UnwrapAopProxyExtension.java