@Test
@SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX")
public void testRandomSample() {

  Thread[] threads = Threads.getThreads();
  Threads.randomFirst(2, threads);
  Assert.assertNull(threads[2]);
  Assert.assertNotNull(threads[1]);
  Assert.assertNotSame(threads[0], threads[1]);
}