LoggingUncaughtExceptionHandler { public static int getUncaughtExceptionsCount() { return handler.getUncaughtExceptionsCount(); } LoggingUncaughtExceptionHandler(); static UncaughtExceptionHandler getInstance(); static void setOnThread(final Thread thread); static void setFailureSetter(final FailureSetter failureSetter); static int getUncaughtExceptionsCount(); static void clearUncaughtExceptionsCount();  }
@Test public void verifyThatCallingUncaughtExceptionIncreasesTheCountByOne() { Logger logger = mock(Logger.class); Implementation handler = new Implementation(logger); int count = handler.getUncaughtExceptionsCount(); handler.uncaughtException(null, null); assertThat(handler.getUncaughtExceptionsCount()).isEqualTo(count + 1); }