private boolean invokeCleanups(Object target, Class<?> cleanupClazz)
throws Exception {
if (cleanupClazz != null) {
for (Method m : target.getClass().getMethods()) {
Cleanup cleanup = m.getAnnotation(Cleanup.class);
if (cleanup != null && cleanup.value().equals(cleanupClazz)) {
m.invoke(target);
return true;
}
}
} else {