* Test of {@link OrderedProperties}
*/
public class OrderedPropertiesTest {
@Test
public void testRead() throws IOException {
OrderedProperties props = new OrderedProperties();
props.load(new StringReader("Foo: Bar,\\\nnaf\nBar: naf\nBaz=naf\n"));
Enumeration<Object> keys = props.keys();
assertThat((String)keys.nextElement(), equalTo("Foo"));
assertThat((String)keys.nextElement(), equalTo("Bar"));
assertThat((String)keys.nextElement(), equalTo("Baz"));
Enumeration<?> propertyNames = props.propertyNames();
assertThat((String)propertyNames.nextElement(), equalTo("Foo"));
assertThat((String)propertyNames.nextElement(), equalTo("Bar"));
assertThat((String)propertyNames.nextElement(), equalTo("Baz"));
Iterator<String> iterator = props.stringPropertyNames().iterator();
assertThat(iterator.next(), equalTo("Foo"));
assertThat(iterator.next(), equalTo("Bar"));
assertThat(iterator.next(), equalTo("Baz"));
}