@Test(expected = IllegalArgumentException.class)
public void testRequireViewByIdMissing() {

    View container = mActivityTestRule.getActivity().findViewById(R.id.container);
    // action_bar isn't present inside container
    ViewCompat.requireViewById(container, R.id.action_bar);
}