public static <T> T ifOverridden(Supplier<T> supplier, @NonNull Class<?> base, @NonNull Class<?> derived, @NonNull String methodName, @NonNull Class<?>... types) {
        if (isOverridden(base, derived, methodName, types)) {
            return supplier.get();
        } else {
            throw new AbstractMethodError("The class " + derived.getName() + " must override at least one of the "
                    + base.getSimpleName() + "." + methodName + " methods");
        }
    }
@Test
    public void ifOverriddenFailure() {
        AbstractMethodError error = Assert.assertThrows(AbstractMethodError.class, () -> Util.ifOverridden(() -> true, BaseClass.class, DerivedClassFailure.class, "method"));
        assertEquals("The class " + DerivedClassFailure.class.getName() + " must override at least one of the BaseClass.method methods", error.getMessage());
    }