void () { String directives = "[" + generateDirectives() + "]"; Runnable runnable = () -> setDirectives(directives); if (ApplicationManager.getApplication().isUnitTestMode()) { runnable.run(); } else { ApplicationManager.getApplication().executeOnPooledThread(runnable); } }