OrderedProperties { public OrderedProperties addMapPairs(Map<String, String> additionalPairs) { addIterablePairs(additionalPairs.entrySet()); 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 addMapPairs() { Map<String, String> additional = new LinkedHashMap<>(); additional.put("fifth", "5"); additional.put("first", "6"); OrderedProperties pairs = createTestKeyValues().addMapPairs(additional); assertKeyOrder(pairs, "first", "second", "third", "FOURTH", "fifth"); assertValueOrder(pairs, "6", "2", "3", "4", "5"); }