@Before public void setUp() throws Exception { activity = new TestFragmentActivity(); activity.onCreate(null); manager = (TestFragmentManager) activity.getSupportFragmentManager(); fragment = new TestFragment(); containerView = (ViewGroup) activity.findViewById(CONTAINER_VIEW_ID); }