title: Android Espresso Testing - Checking Buttons
body: <p>So I've written a basic test for my homescreen right now that checks if the three buttons on the homescreen are clickable. I was wondering how I would check to see if each of the buttons go to the right activity when they are clicked. </p>
  
  <pre><code>@RunWith(AndroidJUnit4.class)
  @SmallTest
  public class HomeScreenTest {
  
  @Rule
  public ActivityTestRule&lt;StartActivity&gt; mActivityRule = new ActivityTestRule&lt;&gt;(StartActivity.class);
  
  @Test
  public void testButton() {
  
      Espresso.onView(withId(R.id.event_button)).check(matches(isClickable()));
      Espresso.onView(withId(R.id.navigation_button)).check(matches(isClickable()));
      Espresso.onView(withId(R.id.alarm_button)).check(matches(isClickable()));
                           }
                              } 
  </code></pre>