### Question:
ProxyInvocationHandler extends CXFInvocationHandlerBase { public final Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { LOG.fine(this + " on " + method); Object o = getData().getManagedConnection().getManagedConnectionFactory(); ManagedConnectionFactoryImpl mcf = (ManagedConnectionFactoryImpl)o; Bus bus = mcf.getBus(); BusFactory.setDefaultBus(bus); return invokeNext(proxy, method, args); } ProxyInvocationHandler(CXFInvocationHandlerData data); final Object invoke(final Object proxy,
                               final Method method,
                               final Object[] args);  }### Answer:
@Test public void testInvokeSetsBusCurrent() throws Throwable { Bus oldBus = BusFactory.getDefaultBus(); testObject.invoke(target, testMethod, new Object[] {}); Bus newBus = BusFactory.getDefaultBus(); assertSame("Current Bus has been set and is as expected, val=" + newBus, newBus, mockBus); BusFactory.setDefaultBus(oldBus); }