ReflectionUtil { public static Class<?>[] getInterfaces(Object object) { return getInterfaces(object, null); }  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 testGetInterfaces() { Class<?>[] interfaces = ReflectionUtil.getInterfaces(new TestClass()); Assert.assertEquals(Arrays.toString(interfaces), 1, interfaces.length); Assert.assertSame(TestInterface.class, interfaces[0]); AtomicReference<ClassNotFoundException> atomicReference = new AtomicReference<>(); interfaces = ReflectionUtil.getInterfaces( new TestClass(), new URLClassLoader(new URL[0], null)); Assert.assertEquals(Arrays.toString(interfaces), 0, interfaces.length); interfaces = ReflectionUtil.getInterfaces( new TestClass(), new URLClassLoader(new URL[0], null), atomicReference::set); Assert.assertEquals(Arrays.toString(interfaces), 0, interfaces.length); Assert.assertNotNull(atomicReference.get()); }