Retry extends AbstractErrorHandlerLayer<JsonNode> { @Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); } Retry();  Retry(int maxRetries, int initialDelay, int maxDelay,
			double backoffFactor); @Override void configure(JsonNode config); static ObjectNode defaultConfig(); @Override JsonNode getConfiguration(); static final String URI; }
@Test(expected=IllegalArgumentException.class) public void invalidMaxRetries() throws Exception { Retry retry = new Retry(); ObjectNode conf = JsonNodeFactory.instance.objectNode(); conf.put("maxRetries", -15); retry.configure(conf); }
@Test(expected=IllegalArgumentException.class) public void invalidInitialDelay() throws Exception { Retry retry = new Retry(); ObjectNode conf = JsonNodeFactory.instance.objectNode(); conf.put("initialDelay", -15); retry.configure(conf); }
@Test(expected=IllegalArgumentException.class) public void invalidMaxDelay() throws Exception { Retry retry = new Retry(); ObjectNode conf = JsonNodeFactory.instance.objectNode(); conf.put("maxDelay", 150); retry.configure(conf); }