final Class<DirtiesContext> annotationType = DirtiesContext.class;
boolean methodDirtiesContext = testMethod.isAnnotationPresent(annotationType);
boolean classDirtiesContext = testClass.isAnnotationPresent(annotationType);
DirtiesContext classDirtiesContextAnnotation = testClass.getAnnotation(annotationType);
ClassMode classMode = classDirtiesContext ? classDirtiesContextAnnotation.classMode() : null;
if (logger.isDebugEnabled()) {
logger.debug("After test method: context [" + testContext + "], class dirties context ["
+ classDirtiesContext + "], class mode [" + classMode + "], method dirties context ["
+ methodDirtiesContext + "].");