### Question:
MethodInfo { static MethodInfo newInstance(Method method, Object instance) { return new MethodInfo(method, instance); } private  MethodInfo(Method method, Object instance);   }### Answer:
@Test public void newInstance() throws Exception { class MyConfig { @Title("Reset") @Button public void foo() { } } Object instance = new MyConfig(); Method[] methods = instance.getClass().getDeclaredMethods(); MethodInfo methodInfo = MethodInfo.newInstance(methods[0], null); assertThat(methodInfo).isNotNull(); }