OrderedProperties { public OrderedProperties addPair(String key, String value) { pairs.put(key, value); return this; }  OrderedProperties filter(Predicate<String> filter); OrderedProperties addMapPairs(Map<String, String> additionalPairs); OrderedProperties addIterablePairs(Iterable<? extends Map.Entry<String, ?>> iterable); OrderedProperties addStringPairs(String keyValuePairs); OrderedProperties addStringPairs(InputStream is); OrderedProperties addPair(String key, String value); String asPairs(); String asPairsWithComment(String comment); Map<String, String> asMap(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void propertiesContainsEscapes() throws IOException { OrderedProperties pairs = new OrderedProperties() .addPair(" leading", " leading") .addPair("trailing ", "trailing ") .addPair("with\\escape", "with\\escape\r\n\f\t") .addPair("two\nparts", " leading and trailing ") .addPair("\\", "\\") .addPair("", ""); propertiesCompatibility(pairs); }