### Question:
InterfaceMap { public static Class<?> getClass(Object dynamicObject) { Preconditions.checkArgument(isDynamicObject(dynamicObject), "Object must be DynamicObject"); return dynamicObject.getClass().getInterfaces()[0]; } 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 getClass_dynamicObject_ok() { assertEquals(InterfaceMap.getClass(q), PossibleProperties.class); }
@Test(expected = RuntimeException.class) public void getClass_notDynamicObject_throwsException() { InterfaceMap.getClass(new Object()); }