new CountingLatch(maxConcurrent, "execs finished");
submitTasks(numOfThreads,
execsStarted, expectedRejects, execsFinished,
testName);
SoftAssertions softly = new SoftAssertions();
// last requests which exceed the limit will fail to get permit
expectedRejects.awaitAndVerify(softly);
// requests that are within the max concurrent limit should get permit
execsStarted.awaitAndVerify(softly);
// accepted jobs should eventually finish
awakenBlockedRunnables();
execsFinished.awaitAndVerify(softly);
softly.assertAll();
}