package com.mycompany.greeter;
import android.test.ActivityInstrumentationTestCase2;

public class MainActivityTests extends ActivityInstrumentationTestCase2<MainActivity> {
    public MainActivityTests() {
        super(MainActivity.class);
    }
}

@@ -241,10 +241,135 @@
 ;%0A    %7D%0A
+%0A    public void testActivityExists() %7B%0A        MainActivity activity = getActivity();%0A        assertNotNull(activity);%0A    
 %7D%0A
+%7D

Write first test