static void scan(Class<?> aClass, BiConsumer<Method, Annotation> consumer) {
        // prevent unnecessary checking of Object methods
        if (Object.class.equals(aClass)) {
            return;
        }

        if (!isInstantiable(aClass)) {
            return;
        }
        for (Method method : safelyGetMethods(aClass)) {
            scan(consumer, aClass, method);
        }
    }
@Test
    void scan_finds_annotated_methods() throws NoSuchMethodException {
        Method method = BaseSteps.class.getMethod("m");
        MethodScanner.scan(BaseSteps.class, backend);
        assertThat(scanResult, contains(new SimpleEntry<>(method, method.getAnnotations()[0])));
    }