@Test public void getOptions_with_empty_custom_options_returns_options_from_config_only() throws Exception { when(store.read(eq(ConfigManager.ORDER))).thenReturn(Collections.emptyList()); assertEquals(simpleOptions("opt1", "opt2"), configManager.getOptions()); verify(store, times(1)).read(anyString()); }
List<FillOption> getOptions() { final List<FillOption> savedOptions = readConfigsFromStore(); final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size()); result.addAll(savedOptions); result.addAll(fillConfig.getOptions()); return result; }
ConfigManager { List<FillOption> getOptions() { final List<FillOption> savedOptions = readConfigsFromStore(); final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size()); result.addAll(savedOptions); result.addAll(fillConfig.getOptions()); return result; } }
ConfigManager { List<FillOption> getOptions() { final List<FillOption> savedOptions = readConfigsFromStore(); final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size()); result.addAll(savedOptions); result.addAll(fillConfig.getOptions()); return result; } ConfigManager(FillConfig fillConfig, Store store); }
ConfigManager { List<FillOption> getOptions() { final List<FillOption> savedOptions = readConfigsFromStore(); final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size()); result.addAll(savedOptions); result.addAll(fillConfig.getOptions()); return result; } ConfigManager(FillConfig fillConfig, Store store);  }
ConfigManager { List<FillOption> getOptions() { final List<FillOption> savedOptions = readConfigsFromStore(); final List<FillOption> result = new ArrayList<>(fillConfig.getOptions().size() + savedOptions.size()); result.addAll(savedOptions); result.addAll(fillConfig.getOptions()); return result; } ConfigManager(FillConfig fillConfig, Store store);   }