@GwtIncompatible("refreshAfterWrite") public void testRefresh_zero() { CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>(); try { builder.refreshAfterWrite(0, SECONDS); fail(); } catch (IllegalArgumentException expected) { } }
@GwtIncompatible("refreshAfterWrite") public void testRefresh_setTwice() { CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>().refreshAfterWrite(3600, SECONDS); try { // even to the same value is not allowed builder.refreshAfterWrite(3600, SECONDS); fail(); } catch (IllegalStateException expected) { } }
public com.google.common.cache.CacheBuilder<Object, Object> refreshAfterWrite( long duration, TimeUnit unit) { return builder.refreshAfterWrite(duration, unit); }