* @param contextFactory
* @return does initial spring context successfully
*/
@SuppressWarnings("rawtypes")
public static JTesterBeanFactory initSpringContext(Class testClazz, ApplicationContextFactory contextFactory) {
JTesterBeanFactory beanFactory = (JTesterBeanFactory) TestedObject.getSpringBeanFactory();
if (beanFactory != null) {
return beanFactory;
}
SpringApplicationContext annotation = AnnotationUtils.getClassLevelAnnotation(SpringApplicationContext.class,
testClazz);