### Question:
DynamoDBBackoffStrategy extends CustomBackoffStrategy { @Override public int getBackoffPeriod(int retries) { if (retries <= 0) { return 0; } else { int delay = 50 * (int) Math.pow(2, retries - 1); if (delay < 0) { delay = Integer.MAX_VALUE; } return delay; } }  @Override int getBackoffPeriod(int retries); static final CustomBackoffStrategy DEFAULT; }### Answer:
@Test public void testDynamoDBBackoffStrategy() { CustomBackoffStrategy ddb = DynamoDBBackoffStrategy.DEFAULT; assertEquals(ddb.getBackoffPeriod(-1), 0); assertEquals(ddb.getBackoffPeriod(0), 0); assertEquals(ddb.getBackoffPeriod(1), 50); assertEquals(ddb.getBackoffPeriod(2), 100); assertEquals(ddb.getBackoffPeriod(3), 200); assertEquals(ddb.getBackoffPeriod(100), Integer.MAX_VALUE); }