title: Check if the item in recycler view selected
body: <p>I would like to check the property of one of the items in <code>RecyclerView</code>. To be more specific I want to check if this item is selected. </p>
  
  <p>Firstly I select the item</p>
  
  <pre><code>onView(withId(R.id.list_master))
              .perform(
                      RecyclerViewActions.actionOnItemAtPosition(14, clickAnItem(R.id.layout_menu))
              );
  </code></pre>
  
  <p>Secondly check if the specific item is selected: </p>
  
  <pre><code>        onView(allOf(withId(R.id.layout_menu), hasDescendant(withText("SO"))))
              .check(matches(isSelected()));
  </code></pre>
  
  <p>With custom matcher: </p>
  
  <pre><code>    private static Matcher&lt;View&gt; isSelected() {
      return new TypeSafeMatcher&lt;View&gt;() {
          @Override
          protected boolean matchesSafely(View item) {
  
              return item.isSelected();
          }
  
          @Override
          public void describeTo(Description description) {
              description.appendText("Selected property");
          }
      };
  </code></pre>
  
  <p>Sadly the state of this view is not selected, but UI shows it successfully marked as selected item. Implementation details</p>
  
  <pre><code>@Override
  public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
      final ViewHolder viewHolder = (ViewHolder) holder;
      viewHolder.itemView.setSelected(position == selected);
  </code></pre>