package org.qi4j.test.mock;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import org.qi4j.composite.scope.ThisCompositeAs;

public class MockPlayerMixin
    implements InvocationHandler
{

    @ThisCompositeAs MockRepository mockRepository;

    public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable
    {
        System.out.println( "Play on " + method.getDeclaringClass() );
        for( Mock mock : mockRepository.getAll() )
        {
            InvocationHandler handler = mock.getInvocationHandler( proxy, method, args );
            if( handler != null )
            {
                return handler.invoke( mock, method, args );
            }
        }
        throw new IllegalStateException( "No behavior definition" );
    }

}
@@ -395,18 +395,24 @@
 ( %22Play 
-on
+mock for
  %22 + met
@@ -418,28 +418,8 @@
 thod
-.getDeclaringClass()
  );%0A

Change System.out message