### Question:
RequestThrottle { private void execute(String payload) { this.executedCount.incrementAndGet(); }  long getExecutedCount(); void enqueuePayloadWithDelayInMillis(String payload, long delayInMillis); void enqueuePayloadWithDelayInMillis(Runnable runnable, long delayInMillis);  }### Answer:
@Test(enabled = false) public void testNormalSpeed() throws InterruptedException { final long costInMills = 10; final long total_tasks = 2000; for (int i = 0; i < total_tasks; ++i) { this.fooExecutor.execute("cmd " + i, costInMills); } final double expectedQPS = 1000.0 / costInMills * FooExecutor.PARALLEL_TASKS; Thread.sleep((long) (total_tasks / expectedQPS * 1000)); System.out.println("Actual QPS: " + fooExecutor.getQPS()); System.out.println("Expected QPS: " + expectedQPS); Assert.assertTrue(abs(fooExecutor.getQPS() - expectedQPS) < expectedQPS * 0.3); }