// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/ViewIndexMatcher.java
// @CheckResult public static Matcher<View> withIndex(final Matcher<View> matcher, final int index) {
//   return new ViewIndexMatcher(matcher, index);
// }


import androidx.test.espresso.NoMatchingViewException;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.withTagValue;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static com.vanniktech.espresso.core.utils.ViewIndexMatcher.withIndex;
import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.junit.Assert.fail;
package com.vanniktech.espresso.core.utils;



@RunWith(AndroidJUnit4.class) public final class ViewIndexMatcherTest {
  @Rule public final ActivityTestRule<ViewIndexMatcherActivity> activityTestRule = new ActivityTestRule<>(ViewIndexMatcherActivity.class);

  @Test public void index() {
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/ViewIndexMatcher.java
// @CheckResult public static Matcher<View> withIndex(final Matcher<View> matcher, final int index) {
//   return new ViewIndexMatcher(matcher, index);
// }


// Path: espresso-core-utils/src/androidTest/java/com/vanniktech/espresso/core/utils/ViewIndexMatcherTest.java
import androidx.test.espresso.NoMatchingViewException;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.withTagValue;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static com.vanniktech.espresso.core.utils.ViewIndexMatcher.withIndex;
import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.junit.Assert.fail;

package com.vanniktech.espresso.core.utils;



@RunWith(AndroidJUnit4.class) public final class ViewIndexMatcherTest {
  @Rule public final ActivityTestRule<ViewIndexMatcherActivity> activityTestRule = new ActivityTestRule<>(ViewIndexMatcherActivity.class);

  @Test public void index() {
    onView(withIndex(withText("Test"), 0)).check(matches(withTagValue(Matchers.<Object>equalTo(1))));