static void scan(Object testClass, Class<?> clazz) {
AnnotationEngine annotationEngine = new GlobalConfiguration().getAnnotationEngine();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
//below can be removed later, when we get rid of deprecated stuff
if (annotationEngine.getClass() != new DefaultMockitoConfiguration().getAnnotationEngine().getClass()) {
//this means user has his own annotation engine and we have to respect that.
//we will do annotation processing the old way so that we are backwards compatible
processAnnotationDeprecatedWay(annotationEngine, testClass, field);
}
}