@Test
public void testRetriableCommand() {

  try {
    new MyRetriableCommand(5).execute(0);
    Assert.assertTrue(false);
  }
  catch (Exception e) {
    Assert.assertTrue(true);
  }
  try {
    new MyRetriableCommand(3).execute(0);
    Assert.assertTrue(true);
  }
  catch (Exception e) {
    Assert.assertTrue(false);
  }
  try {
    new MyRetriableCommand(5, RetryPolicies.
        retryUpToMaximumCountWithFixedSleep(5, 0, TimeUnit.MILLISECONDS)).execute(0);
    Assert.assertTrue(true);
  }
  catch (Exception e) {
    Assert.assertTrue(false);
  }
}