@Test
public void mockFragmentManagerWithTransaction() {

    FragmentTransaction transaction = mock(FragmentTransaction.class);
    FragmentManager fragmentManager = AndroidMocks.mockFragmentManager(transaction);
    assertThat(fragmentManager).isNotNull();
    assertThat(fragmentManager.beginTransaction()).isEqualTo(transaction);
}