@SuppressWarnings("ConstantConditions")
@Test public void testOnBackPress() {

	// Arrange:
	final FragmentActivity activity = Robolectric.buildActivity(TestCompatActivity.class).create().start().resume().get();
	final FragmentManager fragmentManager = activity.getSupportFragmentManager();
	final WebFragment fragment = new WebFragment();
	fragmentManager.beginTransaction().add(fragment, null).commit();
	fragmentManager.executePendingTransactions();
	final WebView webView = fragment.getWebView();
	webView.loadUrl("http://www.google.com");
	// Act + Assert:
	assertThat(fragment.onBackPress(), is(true));
}