@Test
void ratePerNano() {

    RateControl limiter = new RateControl(1);
    assertThat(limiter.ratePerNano(100, TimeUnit.MICROSECONDS)).isEqualTo(0.1);
    assertThat(limiter.ratePerNano(1, TimeUnit.SECONDS)).isEqualTo(0.000000001);
    assertThat(limiter.ratePerNano(100, TimeUnit.NANOSECONDS)).isEqualTo(100);
}