Package org.apache.tuscany.spi.wire

Examples of org.apache.tuscany.spi.wire.WireInvocationHandler.invoke()


   
    public void testIntercept() throws SecurityException, NoSuchMethodException, Throwable {
        WireInvocationHandler h2 = createMock(WireInvocationHandler.class);
        Method method = Runnable.class.getDeclaredMethod("run", new Class[]{});
        Object[] noArgs = new Object[]{};
        expect(h2.invoke(method, noArgs)).andReturn("foo");
        replay(h2);
        RemoteMethodHandler handler = new RemoteMethodHandler(h2, Runnable.class);
        Object o = handler.intercept(null, method, noArgs, null);
        assertEquals("foo", o);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.