    @Test
    public void dismissDialog() {

        // setup the callback
        final DialogManagerCallback callback = createCallbackMock();
        final Dialog dialogMock = createDialogMock();
        when(callback.onCreateDialog(eq(KNOWN_DIALOG), isNull())).thenReturn(dialogMock);
        mDialogManager.setCallback(callback);
        mDialogManager.showDialog(KNOWN_DIALOG);
        // check if dialog was shown
        assertTrue(mDialogManager.isDialogShowing(KNOWN_DIALOG));
        mDialogManager.dismissDialog(KNOWN_DIALOG);
        assertFalse(mDialogManager.isDialogShowing(KNOWN_DIALOG));
    }