### Question:
ClassHelper { public static Object getRealObject(Object o) { return getContextClassUnwrapper(getBus(null)).getRealObject(o); } protected  ClassHelper(); static Class<?> getRealClass(Object o); static Class<?> getRealClassFromClass(Class<?> cls); static Class<?> getRealClassFromClass(Bus bus, Class<?> cls); static Object getRealObject(Object o); static Class<?> getRealClass(Bus bus, Object o); static final String USE_DEFAULT_CLASS_HELPER; }### Answer:
@Test public void getRealObjectPropertyWasSetInBus() { EasyMock.expect(bus.getProperty(ClassHelper.USE_DEFAULT_CLASS_HELPER)).andReturn(true); EasyMock.expect(bus.getProperty(ClassUnwrapper.class.getName())).andReturn(null); EasyMock.replay(bus); assertSame(realObjectInternalProxy, ClassHelper.getRealObject(proxiedObject)); EasyMock.verify(bus); }
@Test public void getRealObjectPropertyWasNotSetInBus() { EasyMock.expect(bus.getProperty(ClassHelper.USE_DEFAULT_CLASS_HELPER)).andReturn(false); EasyMock.expect(bus.getProperty(ClassUnwrapper.class.getName())).andReturn(null); EasyMock.replay(bus); assertSame(realObjectInternalSpring, ClassHelper.getRealObject(springAopObject)); EasyMock.verify(bus); }