public static ChangesRequiringRestart getChangesRequiringRestart(ConfigInstance from, ConfigInstance to) {
        Class<?> clazz = from.getClass();
        if (!clazz.equals(to.getClass())) {
            throw new IllegalArgumentException(String.format("%s != %s", clazz, to.getClass()));
        }
        try {
            Method m = clazz.getDeclaredMethod("getChangesRequiringRestart", clazz);
            m.setAccessible(true);
            return (ChangesRequiringRestart) m.invoke(from, to);
        }  catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
@Test
    void requireThatGetChangesRequiringRestartValidatesParameterTypes() {
        assertThrows(IllegalArgumentException.class, () -> {
            ReflectionUtil.getChangesRequiringRestart(new RestartConfig(), new NonRestartConfig());
        });
    }