@Test public void testRegisterOnBackStackChangeListener() {

	// 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);
	// Act:
	controller.registerOnBackStackChangeListener(firstMockListener);
	controller.registerOnBackStackChangeListener(firstMockListener);
	controller.registerOnBackStackChangeListener(secondMockListener);
	// Assert:
	final FragmentManager.BackStackEntry mockBackStackEntry = mock(FragmentManager.BackStackEntry.class);
	controller.notifyBackStackEntryChange(mockBackStackEntry, true);
	verify(firstMockListener).onFragmentsBackStackChanged(mockBackStackEntry, true);
	verify(secondMockListener).onFragmentsBackStackChanged(mockBackStackEntry, true);
	verifyNoMoreInteractions(firstMockListener, secondMockListener);
}