void (Invoker foreground, Invoker background, Boolean equal) { CountDownLatch latch = new CountDownLatch(1); test(foreground, latch, error -> process(background, foreground, Thread::currentThread, thread -> countDown(latch, 0, error, "unexpected thread", () -> isExpected(thread, equal)))); }