@Test public void testUnregisterOnBackStackChangeListener() {

	// Arrange:
	final FragmentActivity activity = Robolectric.buildActivity(TestCompatActivity.class).create().start().resume().get();
	final FragmentController controller = new FragmentController(activity.getSupportFragmentManager());
	final FragmentController.OnBackStackChangeListener firstMockListener = mock(FragmentController.OnBackStackChangeListener.class);
	final FragmentController.OnBackStackChangeListener secondMockListener = mock(FragmentController.OnBackStackChangeListener.class);
	controller.registerOnBackStackChangeListener(firstMockListener);
	controller.registerOnBackStackChangeListener(secondMockListener);
	// Act:
	controller.unregisterOnBackStackChangeListener(firstMockListener);
	// Assert:
	final FragmentManager.BackStackEntry mockBackStackEntry = mock(FragmentManager.BackStackEntry.class);
	controller.notifyBackStackEntryChange(mockBackStackEntry, true);
	verifyZeroInteractions(firstMockListener);
	verify(secondMockListener).onFragmentsBackStackChanged(mockBackStackEntry, true);
	controller.unregisterOnBackStackChangeListener(secondMockListener);
	controller.notifyBackStackEntryChange(mockBackStackEntry, false);
	verifyNoMoreInteractions(secondMockListener);
}