@Test public void testAddSpringConfig() { SpringConfig config = new SpringConfig(TENSION, FRICTION); mSpringConfigRegistrySpy.addSpringConfig(config, CONFIG_NAME); Map<SpringConfig, String> configs = mSpringConfigRegistrySpy.getAllSpringConfig(); assertEquals(1, configs.size()); assertTrue(configs.containsKey(config)); String configName = configs.get(config); assertEquals(configName, CONFIG_NAME); }
public boolean addSpringConfig(SpringConfig springConfig, String configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.containsKey(springConfig)) { return false; } mSpringConfigMap.put(springConfig, configName); return true; }
SpringConfigRegistry { public boolean addSpringConfig(SpringConfig springConfig, String configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.containsKey(springConfig)) { return false; } mSpringConfigMap.put(springConfig, configName); return true; } }
SpringConfigRegistry { public boolean addSpringConfig(SpringConfig springConfig, String configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.containsKey(springConfig)) { return false; } mSpringConfigMap.put(springConfig, configName); return true; } SpringConfigRegistry(boolean includeDefaultEntry); }
SpringConfigRegistry { public boolean addSpringConfig(SpringConfig springConfig, String configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.containsKey(springConfig)) { return false; } mSpringConfigMap.put(springConfig, configName); return true; } SpringConfigRegistry(boolean includeDefaultEntry); static SpringConfigRegistry getInstance(); boolean addSpringConfig(SpringConfig springConfig, String configName); boolean removeSpringConfig(SpringConfig springConfig); Map<SpringConfig, String> getAllSpringConfig(); void removeAllSpringConfig(); }
SpringConfigRegistry { public boolean addSpringConfig(SpringConfig springConfig, String configName) { if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } if (configName == null) { throw new IllegalArgumentException("configName is required"); } if (mSpringConfigMap.containsKey(springConfig)) { return false; } mSpringConfigMap.put(springConfig, configName); return true; } SpringConfigRegistry(boolean includeDefaultEntry); static SpringConfigRegistry getInstance(); boolean addSpringConfig(SpringConfig springConfig, String configName); boolean removeSpringConfig(SpringConfig springConfig); Map<SpringConfig, String> getAllSpringConfig(); void removeAllSpringConfig();  }