@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);
}