title: Android Espresso testing SwipeRefreshLayout OnRefresh not been triggered on swipeDown
body: <p>I'm trying to write simple test for pull to refresh as a part of integration testing. I'm using the newest androidX testing components and Robolectric. I'm testing isolated fragment in which one I'm injecting mocked presenter.</p>
  
  <p>XML layout part</p>
  
  <pre><code>&lt;androidx.swiperefreshlayout.widget.SwipeRefreshLayout
          android:id="@+id/refreshLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;androidx.recyclerview.widget.RecyclerView
              android:id="@+id/recyclerTasks"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/&gt;
  &lt;/androidx.swiperefreshlayout.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p>Fragment part</p>
  
  <pre><code>binding.refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
              @Override
              public void onRefresh() {
                  presenter.onRefresh();
              }
          });
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>onView(withId(R.id.refreshLayout)).perform(swipeDown());
  verify(presenter).onRefresh();
  </code></pre>
  
  <p>but test doesn't pass, message: </p>
  
  <blockquote>
    <p>Wanted but not invoked: presenter.onRefresh();</p>
  </blockquote>
  
  <p>The app works perfectly fine and pull to refresh calls presenter.onRefresh(). I did also debugging of the test and setOnRefreshListener been called and it's not a null. If I do testing with custom matcher to check the status of SwipeRefreshLayout test passes.</p>
  
  <pre><code>onView(withId(R.id.refreshLayout)).check(matches(isRefreshing()));
  </code></pre>