@SuppressLint("CommitTransaction")
@Test public void testOnExecuteRequest() {

	// Arrange:
	final FragmentManager mockManager = mock(FragmentManager.class);
	final FragmentTransaction mockTransaction = mock(FragmentTransaction.class);
	final FragmentController controller = new FragmentController(mockManager);
	controller.setViewContainerId(TestActivity.CONTENT_VIEW_ID);
	when(mockManager.beginTransaction()).thenReturn(mockTransaction);
	final Fragment fragment = new TestFragment();
	final FragmentRequest request = controller.newRequest(fragment).transaction(FragmentRequest.ADD);
	// Act + Assert:
	assertThat(controller.onExecuteRequest(request), is(fragment));
	verify(mockManager).beginTransaction();
	verify(mockTransaction).commit();
}