title: Whats the difference between intending vs intended in Espresso?
body: <p>Its been 2 weeks since I am studying Espresso and I could not grasp <code>intending</code> and <code>intended</code>. When do I use <code>intending</code> and <code>intended</code>? The provided example and online tutorials are not helping and researching the web is doing me more damage than good.</p>
  
  <p>Semantically, for intellectual reference, why is it <code>intend-ing</code> and the other <code>intended</code>, this added more to the confusion. Is this another Google naming blunder or it's just me? These two methods really don't make sense. </p>
  
  <p>I am misunderstanding its usage. <a href="https://stackoverflow.com/questions/30891794/is-there-any-way-to-know-if-an-activity-has-been-started-with-espresso">I wanted to test if my activity <code>A</code> launched activity <code>B</code></a>. That's it. Here is my code:</p>
  
  <pre><code>@Test
  public void shouldLaunchTagListActivity()
  {
      onView(withId(R.id.edittext_description_minimized))
              .perform(click());
  
      onView(withId(R.id.linearlayout_add_note_maximize))
              .check(matches(isDisplayed()));
  
      onView(withId(R.id.relativelayout_quick_action_button))
              .check(matches(isDisplayed()));
  
      onView(withId(R.id.imagebutton_tag))
              .perform(click());
  
      // should I intended or intending here?
      // ???
      intended(toPackage(HomeScreenActivity.class.getName()));
  
      onView(withId(R.id.coordinatorlayout_tag_list))
              .check(matches(isDisplayed()));
  }
  </code></pre>
  
  <p>This test always passes even I supplant the intent with the wrong the target.</p>
  
  <p>I can check if the other activity has been launched by checking if my target view is existing and was seen by the user. But now I am going to run on a different user story where I really need to check if the activity sent the request to launched another activity (my activity, not external).</p>
  
  <p>Any explanation is greatly appreciated!</p>