### Question:
LoggableThreading { @Loggable(Loggable.DEBUG) public int foo() { return 1; }  @Loggable(Loggable.DEBUG) int foo();  }### Answer:
@Test public void loggableThreadTerminates() throws Exception { new LoggableThreading().foo(); Thread thread = null; final Set<Thread> keys = Thread.getAllStackTraces().keySet(); final Thread[] threads = keys.toArray(new Thread[keys.size()]); for (int idx = 0; idx < threads.length; idx++) { if (threads[idx].getName().equals("jcabi-loggable")) { thread = threads[idx]; break; } } MatcherAssert.assertThat(thread, Matchers.notNullValue()); thread.interrupt(); TimeUnit.SECONDS.sleep(Tv.TEN); MatcherAssert.assertThat( thread.getState(), Matchers.is(State.TERMINATED) ); }