public void testMethodInvocationImplementation() throws Exception
{
final InterceptorTester tester = new InterceptorTester();
final EchoImpl target = new EchoImpl();
final Echo proxy = ( Echo ) new JavassistProxyFactory().createInterceptorProxy( target, new MethodInterceptorAdapter( tester ), new Class[] { Echo.class } );
proxy.echo();
assertNotNull( tester.invocation.getArguments() );
assertEquals( 0, tester.invocation.getArguments().length );
assertEquals( Echo.class.getMethod( "echo", new Class[] {} ), tester.invocation.getMethod() );
assertEquals( Echo.class.getMethod( "echo", new Class[] {} ), tester.invocation.getStaticPart() );