Here's an alternative (and more idiomatic approach):
onView(withId(R.id.toolbar)).check(matches(hasDescendant(withText(toolbarTitle))))
Here's an alternative (and more idiomatic approach):
onView(withId(R.id.toolbar)).check(matches(hasDescendant(withText(toolbarTitle))))