EpisodeFeedsActivity extends MyPodcastsActivity { @Override protected void onDestroy() { dismissProgressDialog(); super.onDestroy(); }    }
@Test public void itHidesProgressDialogOnDestroyToAvoidNotAttachedWindowManager() { when(progressDialogMock.isShowing()).thenReturn(true); createActivityWith(aFeed("Awesome Feed")).onDestroy(); verify(progressDialogMock, times(2)).dismiss(); }