@Test public void testMissingUiAutomator() { EspSystemDialog espSystemDialog = new EspSystemDialog() { @Override protected void throwIfUiAutomatorNotExist() throws ClassNotFoundException { throw new ClassNotFoundException(); } @Override protected void dismissIfShownInternal() { throw new UnsupportedOperationException(); } }; espSystemDialog.dismissIfShown(); // should not fail } }