source: class DirectoryChooserFragmentTest {
  
  	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
  	@Test
  	public void testWithDirectory() {
  
target: 		final DirectoryChooserFragment fragment = DirectoryChooserFragment.newInstance("mydir",
  				null);
  
  		startFragment(fragment, DirectoryChooserActivityMock.class);
  
  		final View chooseBtn = fragment.getActivity().findViewById(R.id.btnConfirm);
  		assertThat(chooseBtn).isEnabled();
  
  		assert chooseBtn.performClick();
  
  		assertNotNull(((DirectoryChooserActivityMock) fragment.getActivity()).selectedDirectory);
  	}
  
  }