public <T extends Annotation> void doCleanup(TestContext context, Class<T> cleanupAnnotationClass) {
        final Annotation[] annotations = context.getTestMethod().getAnnotations();
        for ( Annotation annotation : annotations ) {
            T cleanup = annotation.annotationType().getAnnotation(cleanupAnnotationClass);
            if ( null != cleanup ) {
                try {
                    executeScript(context, annotation);
                } catch (Throwable ignored) {
                }
            }
        }
    }