EditorFileConfig { public ConfigProperty getConfigProperty(String name) { for (ConfigProperty configProperty: configProperties) { if (name.equals(configProperty.getType().getName())) { return configProperty; } } return null; } EditorFileConfig(final String path, final Set<ConfigProperty> configProperties); String getPath(); Set<ConfigProperty> getConfigProperties(); ConfigProperty getConfigProperty(String name); @Override String toString();  }
@Test public void getPropertyReturnsProperty() { final ConfigProperty<IndentStyleOption> indentStyle = new ConfigProperty<IndentStyleOption>(new IndentStyle(), IndentStyleOption.TAB); final ConfigProperty<Integer> indentSize = new ConfigProperty<Integer>(new IndentSize(), 2); @SuppressWarnings("rawtypes") Set<ConfigProperty> properties = new HashSet<ConfigProperty>(); properties.add(indentStyle); properties.add(indentSize); EditorFileConfig config = new EditorFileConfig("", properties); assertSame(indentStyle, config.getConfigProperty("INDENT_STYLE")); assertSame(indentSize, config.getConfigProperty("INDENT_SIZE")); assertNull(config.getConfigProperty("TAB_WIDTH")); }