Extract shared code from cf-based service nyets

The service connector spec now uses the TestApp model to test
environment variables.