test_class.file: outland-feature-java/src/test/java/outland/feature/FeatureStoreRealTest.java
test_class.identifier: FeatureStoreRealTest
test_case.body: @Test
    public void noApiServerAndFailingLocalStoreDoesNotCrashTheFeatureLoader() {
  
      ServerConfiguration serverConfiguration =
          new ServerConfiguration()
              .baseURI("http://localhost")
              .defaultGroup("the_group");
  
      final FeatureClient client = FeatureClient.newBuilder()
          // set useless store and backing
          .featureStore(new FeatureStoreFailing())
          .localFeatureStore(new FeatureStoreLocalNone())
          .serverConfiguration(serverConfiguration)
          .build();
  
      FeatureStoreLocal failing = new FeatureStoreLocalFailing();
  
      FeatureStoreReal fs = new FeatureStoreReal(client, failing);
      try {
        fs.open();
        assertTrue("should call api server for single group",
            fs.loadFromApiAttempted.get());
        assertFalse("should call api server for single group when api server down",
            fs.loadFromApiSuccessful.get());
        assertTrue(
            "should call local store for single group",
            fs.loadFromLocalAttempted.get());
        assertFalse("should not load local store for single group when local store crashes",
            fs.loadFromLocalSuccessful.get());
      } catch (Exception e) {
        e.printStackTrace();
        fail();
      }
    }
test_case.class_method_signature: FeatureStoreRealTest.noApiServerAndFailingLocalStoreDoesNotCrashTheFeatureLoader()
test_case.full_signature: @Test public void noApiServerAndFailingLocalStoreDoesNotCrashTheFeatureLoader()
test_case.identifier: noApiServerAndFailingLocalStoreDoesNotCrashTheFeatureLoader
test_case.invocations: defaultGroup baseURI build serverConfiguration localFeatureStore featureStore newBuilder open assertTrue get assertFalse get assertTrue get assertFalse get printStackTrace fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void noApiServerAndFailingLocalStoreDoesNotCrashTheFeatureLoader()
focal_class.declarator: logger = LoggerFactory.getLogger(FeatureClient.class.getSimpleName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(FeatureClient.class.getSimpleName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: MAX_CACHE_SIZE = ServerConfiguration.MAX_CACHE_SIZE
focal_class.modifier: private static final
focal_class.original_string: private static final long MAX_CACHE_SIZE = ServerConfiguration.MAX_CACHE_SIZE;
focal_class.type: long
focal_class.var_name: MAX_CACHE_SIZE
focal_class.declarator: INITIAL_CAPACITY = ServerConfiguration.INITIAL_CAPACITY
focal_class.modifier: private static final
focal_class.original_string: private static final int INITIAL_CAPACITY = ServerConfiguration.INITIAL_CAPACITY;
focal_class.type: int
focal_class.var_name: INITIAL_CAPACITY
focal_class.declarator: REFRESH_AFTER_WRITE_S = ServerConfiguration.REFRESH_AFTER_WRITE_S
focal_class.modifier: private static final
focal_class.original_string: private static final int REFRESH_AFTER_WRITE_S = ServerConfiguration.REFRESH_AFTER_WRITE_S;
focal_class.type: int
focal_class.var_name: REFRESH_AFTER_WRITE_S
focal_class.declarator: client
focal_class.modifier: private final
focal_class.original_string: private final FeatureClient client;
focal_class.type: FeatureClient
focal_class.var_name: client
focal_class.declarator: backingFeatureStore
focal_class.modifier: private final
focal_class.original_string: private final FeatureStoreLocal backingFeatureStore;
focal_class.type: FeatureStoreLocal
focal_class.var_name: backingFeatureStore
focal_class.declarator: loadFromApiSuccessful = new AtomicBoolean(false)
focal_class.modifier: @VisibleForTesting
focal_class.original_string: @VisibleForTesting AtomicBoolean loadFromApiSuccessful = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: loadFromApiSuccessful
focal_class.declarator: loadFromLocalSuccessful = new AtomicBoolean(false)
focal_class.modifier: @VisibleForTesting
focal_class.original_string: @VisibleForTesting AtomicBoolean loadFromLocalSuccessful = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: loadFromLocalSuccessful
focal_class.declarator: loadFromApiAttempted = new AtomicBoolean(false)
focal_class.modifier: @VisibleForTesting
focal_class.original_string: @VisibleForTesting AtomicBoolean loadFromApiAttempted = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: loadFromApiAttempted
focal_class.declarator: loadFromLocalAttempted = new AtomicBoolean(false)
focal_class.modifier: @VisibleForTesting
focal_class.original_string: @VisibleForTesting AtomicBoolean loadFromLocalAttempted = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: loadFromLocalAttempted
focal_class.declarator: featureCache
focal_class.modifier: private
focal_class.original_string: private LoadingCache<String, FeatureRecord> featureCache;
focal_class.type: LoadingCache<String, FeatureRecord>
focal_class.var_name: featureCache
focal_class.declarator: maxCacheSize = FeatureStoreReal.MAX_CACHE_SIZE
focal_class.modifier: private
focal_class.original_string: private long maxCacheSize = FeatureStoreReal.MAX_CACHE_SIZE;
focal_class.type: long
focal_class.var_name: maxCacheSize
focal_class.declarator: initialCacheSize = FeatureStoreReal.INITIAL_CAPACITY
focal_class.modifier: private
focal_class.original_string: private int initialCacheSize = FeatureStoreReal.INITIAL_CAPACITY;
focal_class.type: int
focal_class.var_name: initialCacheSize
focal_class.declarator: refreshCacheAfterWriteSeconds = FeatureStoreReal.REFRESH_AFTER_WRITE_S
focal_class.modifier: private
focal_class.original_string: private long refreshCacheAfterWriteSeconds = FeatureStoreReal.REFRESH_AFTER_WRITE_S;
focal_class.type: long
focal_class.var_name: refreshCacheAfterWriteSeconds
focal_class.file: outland-feature-java/src/main/java/outland/feature/FeatureStoreReal.java
focal_class.identifier: FeatureStoreReal
focal_class.interfaces: implements FeatureStore
focal_class.class_method_signature: FeatureStoreReal.FeatureStoreReal(FeatureClient client, FeatureStoreLocal backingFeatureStore)
focal_class.full_signature:   FeatureStoreReal(FeatureClient client, FeatureStoreLocal backingFeatureStore)
focal_class.identifier: FeatureStoreReal
focal_class.parameters: (FeatureClient client, FeatureStoreLocal backingFeatureStore)
focal_class.signature:  FeatureStoreReal(FeatureClient client, FeatureStoreLocal backingFeatureStore)
focal_class.class_method_signature: FeatureStoreReal.open()
focal_class.full_signature:  void open()
focal_class.identifier: open
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void open()
focal_class.class_method_signature: FeatureStoreReal.put(Feature feature)
focal_class.full_signature: @Override public Void put(Feature feature)
focal_class.identifier: put
focal_class.modifiers: @Override public
focal_class.parameters: (Feature feature)
focal_class.return: Void
focal_class.signature: Void put(Feature feature)
focal_class.class_method_signature: FeatureStoreReal.find(String group, String featureKey)
focal_class.full_signature: @Override public FeatureRecord find(String group, String featureKey)
focal_class.identifier: find
focal_class.modifiers: @Override public
focal_class.parameters: (String group, String featureKey)
focal_class.return: FeatureRecord
focal_class.signature: FeatureRecord find(String group, String featureKey)
focal_class.class_method_signature: FeatureStoreReal.findAll(String group)
focal_class.full_signature: @Override public FeatureCollection findAll(String group)
focal_class.identifier: findAll
focal_class.modifiers: @Override public
focal_class.parameters: (String group)
focal_class.return: FeatureCollection
focal_class.signature: FeatureCollection findAll(String group)
focal_class.class_method_signature: FeatureStoreReal.remove(String group, String featureKey)
focal_class.full_signature: @Override public Void remove(String group, String featureKey)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (String group, String featureKey)
focal_class.return: Void
focal_class.signature: Void remove(String group, String featureKey)
focal_class.class_method_signature: FeatureStoreReal.removeAll()
focal_class.full_signature: @Override public Void removeAll()
focal_class.identifier: removeAll
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Void
focal_class.signature: Void removeAll()
focal_class.class_method_signature: FeatureStoreReal.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: FeatureStoreReal.buildCache(FeatureClient client,
        FeatureStoreLocal backingFeatureStore)
focal_class.full_signature: private LoadingCache<String, FeatureRecord> buildCache(FeatureClient client,
        FeatureStoreLocal backingFeatureStore)
focal_class.identifier: buildCache
focal_class.modifiers: private
focal_class.parameters: (FeatureClient client,
        FeatureStoreLocal backingFeatureStore)
focal_class.return: LoadingCache<String, FeatureRecord>
focal_class.signature: LoadingCache<String, FeatureRecord> buildCache(FeatureClient client,
        FeatureStoreLocal backingFeatureStore)
focal_class.class_method_signature: FeatureStoreReal.loadFeaturesIntoCache()
focal_class.full_signature: private void loadFeaturesIntoCache()
focal_class.identifier: loadFeaturesIntoCache
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadFeaturesIntoCache()
focal_class.class_method_signature: FeatureStoreReal.loadedFromApi(String group)
focal_class.full_signature: private boolean loadedFromApi(String group)
focal_class.identifier: loadedFromApi
focal_class.modifiers: private
focal_class.parameters: (String group)
focal_class.return: boolean
focal_class.signature: boolean loadedFromApi(String group)
focal_class.class_method_signature: FeatureStoreReal.loadedFromLocal()
focal_class.full_signature: private boolean loadedFromLocal()
focal_class.identifier: loadedFromLocal
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean loadedFromLocal()
focal_class.class_method_signature: FeatureStoreReal.newFeatureRecord(Feature f)
focal_class.full_signature: private FeatureRecord newFeatureRecord(Feature f)
focal_class.identifier: newFeatureRecord
focal_class.modifiers: private
focal_class.parameters: (Feature f)
focal_class.return: FeatureRecord
focal_class.signature: FeatureRecord newFeatureRecord(Feature f)
focal_method.body: void open() {
      loadFeaturesIntoCache();
    }
focal_method.class_method_signature: FeatureStoreReal.open()
focal_method.full_signature:  void open()
focal_method.identifier: open
focal_method.invocations: loadFeaturesIntoCache
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void open()