@Test public void newValue_has_not_valid_cache_after_initialized() throws InterruptedException { assertFalse(valueToTest.isCacheValid()); }
public boolean isCacheValid() { long now = System.currentTimeMillis(); if (now - timestamp < cacheTimeInMillis) { return true; } return false; }
CacheableMonitoringValue { public boolean isCacheValid() { long now = System.currentTimeMillis(); if (now - timestamp < cacheTimeInMillis) { return true; } return false; } }
CacheableMonitoringValue { public boolean isCacheValid() { long now = System.currentTimeMillis(); if (now - timestamp < cacheTimeInMillis) { return true; } return false; } CacheableMonitoringValue(long cacheTimeInMillis); }
CacheableMonitoringValue { public boolean isCacheValid() { long now = System.currentTimeMillis(); if (now - timestamp < cacheTimeInMillis) { return true; } return false; } CacheableMonitoringValue(long cacheTimeInMillis); void setValue(double value); double getValue(); Object getAdditionalData(String key); void setAdditionalData(String key, Object value); boolean isCacheValid(); }
CacheableMonitoringValue { public boolean isCacheValid() { long now = System.currentTimeMillis(); if (now - timestamp < cacheTimeInMillis) { return true; } return false; } CacheableMonitoringValue(long cacheTimeInMillis); void setValue(double value); double getValue(); Object getAdditionalData(String key); void setAdditionalData(String key, Object value); boolean isCacheValid();  }