ReflectionUtil { public static Method getDeclaredMethod( Class<?> clazz, String name, Class<?>... parameterTypes) throws Exception { Method method = clazz.getDeclaredMethod(name, parameterTypes); method.setAccessible(true); return method; }  static Object arrayClone(Object array); static Field getDeclaredField(Class<?> clazz, String name); static Field[] getDeclaredFields(Class<?> clazz); static Method getDeclaredMethod(
			Class<?> clazz, String name, Class<?>... parameterTypes); static Class<?>[] getInterfaces(Object object); static Class<?>[] getInterfaces(
		Object object, ClassLoader classLoader); static Class<?>[] getInterfaces(
		Object object, ClassLoader classLoader,
		Consumer<ClassNotFoundException> classNotFoundHandler); static T throwException(Throwable throwable); static Field unfinalField(Field field);  }
@Test public void testGetDeclaredMethod() throws Exception { Method method = ReflectionUtil.getDeclaredMethod( TestClass.class, "_getPrivateStaticObject"); Assert.assertTrue(method.isAccessible()); Assert.assertSame(TestClass._privateStaticObject, method.invoke(null)); }