### Question:
InterfaceMap { public static boolean isDynamicObject(Object object) { if (object == null) { return false; } Class<?> c = object.getClass(); if (isProxyClass(c)) { InvocationHandler handler = getInvocationHandler(object); return handler instanceof BackingMapInvocationHandler; } return false; } private  InterfaceMap(); @SuppressWarnings("unchecked") static T createInstance(Class<T> interfaceClass, Map<String, Object> backingMap); static T createInstance(Class<T> interfaceClass); static boolean isDynamicObject(Object object); static Class<?> getClass(Object dynamicObject); static Map<String, Object> getBackingMap(Object dynamicObject);  }### Answer:
@Test public void isDynamicObject_true() { assertTrue(InterfaceMap.isDynamicObject(q)); }
@Test public void isDynamicObject_null_returnsFalse() { assertFalse(InterfaceMap.isDynamicObject(null)); }
@Test public void isDynamicObject_notProxy_returnsFalse() { assertFalse(InterfaceMap.isDynamicObject(new Object())); }
@Test public void isDynamicObject_otherProxy_returnsFalse() { assertFalse(InterfaceMap.isDynamicObject(Proxy.newProxyInstance(null, new Class[] {}, new java.lang.reflect.InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return null; } }))); }