@Test
public void testRetryAfterServiceUnavailable() {

    // Do this weird dance here in case there is clock skew between client
    // and server.
    long startTime = System.currentTimeMillis();
    long serverTime = getServerTime();
    new DXHTTPRequest().request("/system/comeBackLater",
            mapper.valueToTree(new ComeBackLaterRequest(serverTime + 8000)),
            RetryStrategy.SAFE_TO_RETRY);
    long timeElapsed = System.currentTimeMillis() - startTime;
    Assert.assertTrue(8000 <= timeElapsed);
    Assert.assertTrue(timeElapsed <= 16000);
}