*
* @return created {@link ApplicationContext}
*/
private ApplicationContext getApplicationContext(TestClass testClass) {
SpringAnnotationConfiguration springConfiguration = testClass.getAnnotation(SpringAnnotationConfiguration.class);
Class<?> wrappedTestClass = testClass.getJavaClass();
String[] packages = configurationClassesProcessor.findPackages(springConfiguration, wrappedTestClass);
Class<?>[] classes = configurationClassesProcessor.findConfigurationClasses(springConfiguration, wrappedTestClass);
Class<? extends ApplicationContext> customAnnotationContextClass;
customAnnotationContextClass = getCustomAnnotationContextClass();
if (springConfiguration.contextClass() != ApplicationContext.class) {
customAnnotationContextClass = springConfiguration.contextClass();
}
if (customAnnotationContextClass != null) {
// creates custom annotated application context