ConfigSet implements ConfigSource { @Override public String toString() { StringBuilder sb = new StringBuilder(); for (Map.Entry<ConfigKey<?>, ConfigInstance.Builder> entry : configs.entrySet()) { sb.append(entry.getKey()).append("=>").append(entry.getValue()); } return sb.toString(); }  @SuppressWarnings({"unchecked", "rawtypes"}) void addBuilder(String configId, ConfigInstance.Builder builder); ConfigInstance.Builder get(ConfigKey<?> key); boolean contains(ConfigKey<?> key); @Override String toString();  }
@Test public void testToString() { ConfigSet set = new ConfigSet(); SimpletypesConfig.Builder builder = new SimpletypesConfig.Builder(); set.addBuilder("foo", builder); assertTrue(Pattern.matches("name=simpletypes,namespace=foo,configId=foo=>com.yahoo.foo.SimpletypesConfig.*", set.toString())); }