You cannot pass objects by reference to the application under
test unless the object referenced comes from the application under
test.
You cannot pass objects by reference to the application
under test until the object referenced is from the application under
test.
To pass a generic Java object to another process
(through spy memory) the Java object must either be a proxy or must
wrapped in a proxy or must be referenced to an object from the application
under test. If the object that is passed is a client test context
object and the system is supposed to pass this as reference to another
test context then an exception is displayed.
Modify the Test UI script so
that the test objects which are passed to application under test has registered proxy references.
For more information see Locating a test object in the application in the
information centre.