class MethodFinderUtils {

    public static Method findAnnotatedMethod(
            final Object pojo,
            final Class<? extends Annotation> annotationClass,
            final Map<Class<?>, Optional<Method>> methods) {

        val clz = pojo.getClass();
        val annotatedMethodIfAny = 
                methods.computeIfAbsent(clz, __->search(clz, annotationClass, methods));
        return annotatedMethodIfAny.orElse(null);
    }

    private  MethodFinderUtils();

}