protected void assertMethodExists(
            final Class clazz,
            final String methodName) {
        for (Method method : clazz.getDeclaredMethods()) {
            if (method.getName().equals(methodName)) {
                return;
            }
        }
        fail("Method not defined: " + clazz.getSimpleName() + "." + methodName
                + "()");
    }