@Test
 public void dismissDialog_shouldDismissPreviouslyShownDialog() throws Exception {
   final DialogCreatingActivity activity = create(DialogCreatingActivity.class);
   activity.showDialog(1);
   activity.dismissDialog(1);
   Dialog dialog = ShadowDialog.getLatestDialog();
   assertFalse(dialog.isShowing());
 }
 @Test(expected = IllegalArgumentException.class)
 public void dismissDialog_shouldThrowExceptionIfDialogWasNotPreviouslyShown() throws Exception {
   final DialogCreatingActivity activity = create(DialogCreatingActivity.class);
   activity.dismissDialog(1);
 }