protected Object createTest()

in src/main/java/org/apache/sling/junit/annotations/SlingAnnotationsTestRunner.java [52:65]


    protected Object createTest() throws Exception {
        final BundleContext ctx = Activator.getBundleContext();
        final ServiceReference<? extends Object> ref = ctx == null ? null : ctx.getServiceReference(TestObjectProcessor.class.getName());
        top = ref == null ? null : (TestObjectProcessor) ctx.getService(ref);
        if(top == null) {
            log.info("No TestObjectProcessor service available, annotations will not be processed");
            return super.createTest();
        } else { 
            log.debug("Using TestObjectProcessor {}", top);
            Object test = top.process(super.createTest());
            tests.add(test);
            return test;
        }
    }