protected static void initClassUnderTest(Object target) {
Field classUnderTestField = Otasco.retrieveClassUnderTest(target);
try {
classUnderTestField.set(target, classUnderTestField.getType().newInstance());
} catch (Exception e) {
throw new OtascoException("When using OtascoMockitoJUnitRunner @ClassUnderTest must have no argument constructor otherwise use Otasco.init().");
}
}