title: Mockito and Android: Check if the order button its working
body: <p>My activity has a ListView, the user can order the list by pressing a button.
  I want to test if this feature is working as I expect. So, I decided to create Mockito test.</p>
  
  <p>What I have so far:</p>
  
  <pre><code>@Test
  public void checkIfOrderAscendingIsWorking() throws Exception {
      // generate random users
      List&lt;User&gt; users = new ArrayList&lt;User&gt;();
      for (int i = 0; i&lt; QUANTITY_USERS_TO_TEST; i++){
          users.add(generateRandomUser(i+1));
      }
  
      mListUserView.displayUsers(users);
      mUserPresenter.sortUsers(true);
  
      // sort the users to compare
      Collections.sort(users, new Comparator&lt;User&gt;() {
          public int compare(User lhs, User rhs) {
              return lhs.name.compareToIgnoreCase(rhs.name);
          }
      });
    // How can I compare both lists? 
  }
  </code></pre>
  
  <p>So, How can I compare the listview user list to my local user list? What is the best practice to do this?</p>