package de.eightbitboy.hijacr.activities;

import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;

@RunWith(AndroidJUnit4.class)
@LargeTest
public class MainActivityTest {

	@Rule
	public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule(MainActivity.class);

	@Test
	public void listGoesOverTheFold() {
		onView(withText("Hello world!")).check(matches(isDisplayed()));
	}
}

@@ -745,16 +745,20 @@
 lass);%0A%0A
+%09/*%0A
 %09@Test%0A%09
@@ -773,31 +773,84 @@
 oid 
-listGoesOverTheFold() %7B
+pagerIsVisible() %7B%0A%09%09onView(withText(%22LIST%22)).check(matches(isDisplayed()));
 %0A%09%09o
@@ -869,20 +869,14 @@
 xt(%22
-Hello world!
+VIEWER
 %22)).
@@ -909,10 +909,14 @@
 )));%0A%09%7D%0A
+%09*/%0A
 %7D%0A

Test fiddle