// Closes the Navigation Drawer
 private void closeDrawer() {
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
 }
 // Opens the Navigation Drawer
 private void openDrawer() {
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
 }