@SuppressWarnings("unchecked")
    private <T extends Annotation> T getClassAnnotation(Class<T> annotation)
    {
        Annotation[] classAnnotations = getTestClass().getAnnotations();
        for (Annotation classAnnotation : classAnnotations) {
            if (classAnnotation.annotationType() == annotation) {
                return (T)classAnnotation;
            }
        }
        
        return null;
    }