task1.await();
Assert.assertEquals(drainerThread2.getName(), "custom-name-001");
task2.proceed();
task2.await();
drainerThread1.join();
drainerThread2.join();
// and that the 'base name' of the borrowed threads is restored
Assert.assertEquals(drainerThread1.getName(), "drainer");
Assert.assertEquals(drainerThread2.getName(), "drainer");
}