### Question:
GangAntiDeadlockLlamaAM extends LlamaAMImpl implements
    LlamaAMListener, Runnable { @Override public PlacedReservation getReservation(UUID reservationId) throws LlamaException { PlacedReservation pr = am.getReservation(reservationId); if (pr == null) { pr = gGetReservation(reservationId); } return pr; } GangAntiDeadlockLlamaAM(Configuration conf, LlamaAM llamaAM); @Override void setMetricRegistry(MetricRegistry metricRegistry); @Override void start(); @Override void stop(); @Override boolean isRunning(); @Override List<NodeInfo> getNodes(); @Override void reserve(UUID reservationId, Reservation reservation); @Override PlacedReservation getReservation(UUID reservationId); @Override PlacedReservation releaseReservation(UUID handle, UUID reservationId,
      boolean doNotCache); @Override List<PlacedReservation> releaseReservationsForHandle(UUID handle,
      boolean doNotCache); List<PlacedReservation> releaseReservationsForQueue(
      String queue, boolean doNotCache); @Override void emptyCacheForQueue(String queue); @Override void addListener(LlamaAMListener listener); @Override void removeListener(LlamaAMListener listener); @Override synchronized void onEvent(LlamaAMEvent event); @Override void run(); static final List<String> METRIC_KEYS; }### Answer:
@Test public void testBackedOffReservation() { PlacedReservationImpl pr = new PlacedReservationImpl(UUID.randomUUID(), TestUtils.createReservation(UUID.randomUUID(), 1, true)); long now = System.currentTimeMillis(); GangAntiDeadlockLlamaAM.BackedOffReservation br1 = new GangAntiDeadlockLlamaAM.BackedOffReservation(pr, 0); Assert.assertEquals(pr, br1.getReservation()); Assert.assertTrue(System.currentTimeMillis() - now >= br1.getDelay(TimeUnit.MILLISECONDS)); GangAntiDeadlockLlamaAM.BackedOffReservation br2 = new GangAntiDeadlockLlamaAM.BackedOffReservation(pr, 100); Assert.assertTrue(System.currentTimeMillis() - now + 100 >= br1.getDelay(TimeUnit.MILLISECONDS)); Assert.assertTrue(br1.compareTo(br2) < 0); }