I have an Activity that pulls an object from an Application extended class (application context) from within the OnCreate() method.
Activity
Application
OnCreate()
With the newer UI testing framework getInstrumentation() is no longer available. One way to get hold of the Application object is to cast the application Context:
getInstrumentation()
Context
Application app = (Application) InstrumentationRegistry .getTargetContext() .getApplicationContext();