@@ -0,0 +1,1727 @@
+/*%0A * Copyright (C) 2015 Pedro Vicente Gomez Sanchez.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.github.pedrovgs.sample;%0A%0Aimport android.test.ActivityInstrumentationTestCase2;%0A%0Aimport static android.support.test.espresso.Espresso.onView;%0Aimport static android.support.test.espresso.action.ViewActions.click;%0Aimport static android.support.test.espresso.assertion.ViewAssertions.matches;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withId;%0Aimport static org.hamcrest.core.Is.is;%0A%0A/**%0A * @author Pedro Vicente Gomez Sanchez.%0A */%0Apublic class MainActivityTest extends ActivityInstrumentationTestCase2%3CMainActivity%3E %7B%0A%0A  public MainActivityTest() %7B%0A    super(MainActivity.class);%0A  %7D%0A%0A  @Override protected void setUp() throws Exception %7B%0A    super.setUp();%0A    getActivity();%0A  %7D%0A%0A  public void shouldShowsLynxViewAsGoneByDefault() %7B%0A    onView(withId(R.id.lynx_view)).check(matches(is(isDisplayed())));%0A  %7D%0A%0A  public void shouldShowsLynxViewOnShowLynxButtonClicked() %7B%0A    onView(withId(R.id.bt_show_lynx_view)).perform(click());%0A%0A    onView(withId(R.id.lynx_view)).check(matches(isDisplayed()));%0A  %7D%0A%7D%0A

Add two tests to MainActivity checking LynxView visibility inside MainActivity