@Test public void testReadMappings() { PropertiesFile propertiesFile= new PropertiesFile(FILE, true); Mappings mappings = Properties.readMappings(propertiesFile); assertEquals(5, mappings.size()); assertEquals("maps.google.com", mappings.get(0).hiddenDomain); }
@VisibleForTesting static Mappings readMappings(PropertiesFile propertiesFile) { Mappings mappings= new Mappings(); PropertiesFile subset = propertiesFile.subset("mapping."); for(String key: subset.keys()) { String value = subset.getString(key); mappings.add( new Mapping(value) ); } return mappings; }
Properties { @VisibleForTesting static Mappings readMappings(PropertiesFile propertiesFile) { Mappings mappings= new Mappings(); PropertiesFile subset = propertiesFile.subset("mapping."); for(String key: subset.keys()) { String value = subset.getString(key); mappings.add( new Mapping(value) ); } return mappings; } }
Properties { @VisibleForTesting static Mappings readMappings(PropertiesFile propertiesFile) { Mappings mappings= new Mappings(); PropertiesFile subset = propertiesFile.subset("mapping."); for(String key: subset.keys()) { String value = subset.getString(key); mappings.add( new Mapping(value) ); } return mappings; } Properties(); }
Properties { @VisibleForTesting static Mappings readMappings(PropertiesFile propertiesFile) { Mappings mappings= new Mappings(); PropertiesFile subset = propertiesFile.subset("mapping."); for(String key: subset.keys()) { String value = subset.getString(key); mappings.add( new Mapping(value) ); } return mappings; } Properties();  }
Properties { @VisibleForTesting static Mappings readMappings(PropertiesFile propertiesFile) { Mappings mappings= new Mappings(); PropertiesFile subset = propertiesFile.subset("mapping."); for(String key: subset.keys()) { String value = subset.getString(key); mappings.add( new Mapping(value) ); } return mappings; } Properties();  final Mappings mappings; }