package flarestar.junit.composite.runner.testobject;

/**
 * TODO
 */
public class TestObjectInstanceContainer {
    public static Object currentTestInstance = null;

    public static void setCurrentInstance(Class<?> testObjectClass) {
        try {
            currentTestInstance = testObjectClass.newInstance();
        } catch (ReflectiveOperationException e) {
            throw new RuntimeException(e);
        }
    }
}

@@ -47,16 +47,77 @@
 bject;%0A%0A
+import org.junit.internal.runners.model.ReflectiveCallable;%0A%0A
 /**%0A * T
@@ -263,16 +263,22 @@
 nstance(
+final 
 Class%3C?%3E
@@ -349,85 +349,265 @@
 e = 
-testObjectClass.newInstance();%0A        %7D catch (ReflectiveOperationException 
+new ReflectiveCallable() %7B%0A                @Override%0A                protected Object runReflectiveCall() throws Throwable %7B%0A                    return testObjectClass.newInstance();%0A                %7D%0A            %7D.run();%0A        %7D catch (Throwable throwabl
 e) %7B
@@ -646,16 +646,24 @@
 ception(
+throwabl
 e);%0A    

Use ReflectiveCallable in TestObjectInstanceContainer.setCurrentInstance().