@Test
public void testEntriesToMap() {

    final Map<String, Integer> parallelConstruction = new HashMap<>();
    parallelConstruction.put("one", 1);
    parallelConstruction.put("two", 2);
    parallelConstruction.put("three", 3);
    final Map<String, Integer> collected = Stream.of(toEntry("one", 1), toEntry("two", 2), toEntry("three", 3))
            .collect(entriesToMap());
    assertEquals("entriesToMap should match with puts", parallelConstruction, collected);
    assertTrue("collected map should be a LinkedHashMap", collected instanceof LinkedHashMap);
}