FluentBackoff { public FluentBackoff withExponent(double exponent) { checkArgument(exponent > 0, "exponent %s must be greater than 0", exponent); return new FluentBackoff( exponent, initialBackoff, maxBackoff, maxCumulativeBackoff, maxRetries); } private  FluentBackoff(
      double exponent,
      Duration initialBackoff,
      Duration maxBackoff,
      Duration maxCumulativeBackoff,
      int maxRetries); BackOff backoff(); FluentBackoff withExponent(double exponent); FluentBackoff withInitialBackoff(Duration initialBackoff); FluentBackoff withMaxBackoff(Duration maxBackoff); FluentBackoff withMaxCumulativeBackoff(Duration maxCumulativeBackoff); FluentBackoff withMaxRetries(int maxRetries); @Override String toString(); static final FluentBackoff DEFAULT; }
@Test public void testInvalidExponent() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("exponent -2.0 must be greater than 0"); defaultBackoff.withExponent(-2.0); }