### Question:
PropertiesTypeConfigurationResolver implements TypeConfigurationResolver { @Override public ComponentConfigurationResolver getConfigurationFactory(final String componentType) { ComponentConfigurationResolver factory = overrides.get(componentType); if (factory != null) return factory; return new ComponentConfigurationResolver() { @Override public ConfigurationNode getConfiguration(final String key) { String prefix = String.format(DEFAULT_FORMAT_STRING, key, componentType); if (properties.containsKey(prefix)) { String json = properties.getProperty(prefix).trim(); if (!json.isEmpty() && json.startsWith("{") && json.endsWith("}")) { try { JsonNode node = mapper.readTree(json); if (node.get(TYPE_FIELD) == null) throw new Exception("Missing 'type' field"); return new JacksonComponentConfiguration(key, node.get(TYPE_FIELD).asText(), node); } catch (Exception e) { throw new RuntimeException( String.format("Unable to parse json from '%s'. (%s)", prefix, StringUtils.abbreviate(json, 256)), e); } } } String typeField = Joiner.on(".").join(prefix, TYPE_FIELD); String typeValue = properties.getProperty(typeField); if (componentType == null) { throw new RuntimeException(String.format("Type for '%s' not specified '%s'", typeField, componentType)); } return new PropertiesComponentConfiguration( key, typeValue, properties, prefix); } @Override public Map<String, ConfigurationNode> getAllConfigurations() { Map<String, ConfigurationNode> configs = Maps.newHashMap(); for (Object key : properties.keySet()) { String[] parts = StringUtils.split(key.toString(), "."); if (parts.length > 1) { String type = parts[1]; if (type.equals(componentType)) { String id = parts[0]; if (!configs.containsKey(id)) { configs.put(id, getConfiguration(id)); } } } } return configs; } }; } @Inject  PropertiesTypeConfigurationResolver(Properties properties, Map<String, ComponentConfigurationResolver> overrides); @Override ComponentConfigurationResolver getConfigurationFactory(final String componentType);  }### Answer:
@Test public void testReadAll() { Properties properties = new Properties(); properties.put("id1.sometype.a", "_a1"); properties.put("id2.sometype", "{\"type\":\"_type\",\"a\":\"_a2\"}"); properties.put("id3.sometype", "{\"type\":\"_type\",\"a\":\"_a3\"}"); properties.put("id1.someothertype.a", "_a"); PropertiesTypeConfigurationResolver resolver = new PropertiesTypeConfigurationResolver(properties, null); Map<String, ConfigurationNode> someTypeConfigs = resolver.getConfigurationFactory("sometype").getAllConfigurations(); Assert.assertEquals(3, someTypeConfigs.keySet().size()); Assert.assertEquals("_a1", someTypeConfigs.get("id1").getChild("a").getValue(String.class)); Assert.assertEquals("_a2", someTypeConfigs.get("id2").getChild("a").getValue(String.class)); Assert.assertEquals("_a3", someTypeConfigs.get("id3").getChild("a").getValue(String.class)); Map<String, ConfigurationNode> someOtherTypeConfigs = resolver.getConfigurationFactory("someothertype").getAllConfigurations(); Assert.assertEquals(1, someOtherTypeConfigs.keySet().size()); Assert.assertEquals("_a", someOtherTypeConfigs.get("id1").getChild("a").getValue(String.class)); }