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

	// Arrange:
	final FragmentManager mockManager = mock(FragmentManager.class);
	final FragmentTransaction mockTransaction = mock(FragmentTransaction.class);
	final FragmentController.OnRequestListener mockListener = mock(FragmentController.OnRequestListener.class);
	final FragmentController controller = new FragmentController(mockManager);
	controller.setViewContainerId(TestActivity.CONTENT_VIEW_ID);
	controller.registerOnRequestListener(mockListener);
	when(mockManager.beginTransaction()).thenReturn(mockTransaction);
	final Fragment fragment = new TestFragment();
	final FragmentRequest request = controller.newRequest(fragment);
	// Act + Assert:
	assertThat(controller.executeRequest(request), is(fragment));
	verify(mockManager).beginTransaction();
	verify(mockListener).onRequestExecuted(request);
	verifyNoMoreInteractions(mockListener);
}