I'd guess that the test application includes references to the production site in response headers and/or payload. You could use the iRule Michael referenced to troubleshoot this. Or you could use a browser plugin like Fiddler2 or HttpFox to track this. If you want to rewrite the response headers, you can use an iRule like this:
http://devcentral.f5.com/wiki/default.aspx/iRules/RewriteHTTPRedirectHostname.html
If you need to rewrite the response content, you can use ProxyPass:
http://devcentral.f5.com/wiki/default.aspx/iRules/proxypassv10
Aaron