@Test public void testExplicitPropertyMappings() { Map<String, String> properties = new ImmutableMap.Builder<String, String>() .put("store.ttl", "2h") .build(); StoreConfig expected = new StoreConfig() .setTtl(new Duration(2, TimeUnit.HOURS)); assertFullMapping(properties, expected); }
@Config("store.ttl") StoreConfig setTtl(Duration ttl) { this.ttl = requireNonNull(ttl, "ttl must not be null"); return this; }
StoreConfig { @Config("store.ttl") StoreConfig setTtl(Duration ttl) { this.ttl = requireNonNull(ttl, "ttl must not be null"); return this; } }
StoreConfig { @Config("store.ttl") StoreConfig setTtl(Duration ttl) { this.ttl = requireNonNull(ttl, "ttl must not be null"); return this; }  }
StoreConfig { @Config("store.ttl") StoreConfig setTtl(Duration ttl) { this.ttl = requireNonNull(ttl, "ttl must not be null"); return this; }   }
StoreConfig { @Config("store.ttl") StoreConfig setTtl(Duration ttl) { this.ttl = requireNonNull(ttl, "ttl must not be null"); return this; }    }