@Test
    public void autoCompleteTextView_oneSuggestion() {
        // Type "South" to trigger one suggestion.
        onView(withId(R.id.auto_complete_text_view))
                .perform(typeTextIntoFocusedView("South "), closeSoftKeyboard());

        // Should be displayed
        onView(withText("South China Sea"))
                .inRoot(withDecorView(not(is(mActivity.getWindow().getDecorView()))))
                .check(matches(isDisplayed()));

        // Should not be displayed.
        onView(withText("Southern Ocean"))
                .inRoot(withDecorView(not(is(mActivity.getWindow().getDecorView()))))
                .check(doesNotExist());
    }
A JUnit {@link Rule @Rule} to launch your activity under test. This is a replacement
for {@link android.test.ActivityInstrumentationTestCase2}.
<p>
Rules are interceptors which are executed for each test method and will run before
any of your setup code in the {@link Before @Before} method.
<p>
{@link ActivityTestRule} will create and launch of the activity for you and also expose
the activity under test. To get a reference to the activity you can use
the {@link ActivityTestRule#getActivity()} method.
ui/espresso/MultiWindowSample/app/src/androidTest/java/com/example/android/testing/espresso/MultiWindowSample/MultiWindowTest.java