@Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("com.ns.yc.yccustomtext", appContext.getPackageName());
    }
Instrumentation test, which will execute on an Android device.

@see <a href="http://d.android.com/tools/testing">Testing documentation</a>
app/src/androidTest/java/com/ns/yc/yccustomtext/ExampleInstrumentedTest.java