Class<? extends MethodInterceptor> interceptorClass = interceptor.interceptor();
//This is the field we want to enhance
Object fieldInstance = field.get(testInstance);
ProxyFactory factory = new ProxyFactory();
factory.setTarget(fieldInstance);
factory.addAdvice(interceptorClass.newInstance());
Object proxy = factory.getProxy();
try{
field.set(testInstance,proxy);
}catch(Exception e){
Assert.fail("Failed while trying to instrument the class for Intercept annotation with exception : " + e.getStackTrace());