@Test public void orderedMapFromStringsToObjectsIsReturned_whenAnyMapIsProvided() { final Map<?, ?> map = ImmutableMap.of("x", "a", "y", 1); final Map<String, Object> result = Events.ensureOrderedMapOfStringsToObjects(map); assertThat(result).hasSize(2).isInstanceOf(LinkedHashMap.class); assertThat(result).containsKeys("x", "y").containsValues("a", 1); }
static Map<String, Object> ensureOrderedMapOfStringsToObjects(final Map<?, ?> map) { final Map<String, Object> result = new LinkedHashMap<>(); map.forEach((key, value) -> result.put((String) key, value)); return result; }
Events { static Map<String, Object> ensureOrderedMapOfStringsToObjects(final Map<?, ?> map) { final Map<String, Object> result = new LinkedHashMap<>(); map.forEach((key, value) -> result.put((String) key, value)); return result; } }
Events { static Map<String, Object> ensureOrderedMapOfStringsToObjects(final Map<?, ?> map) { final Map<String, Object> result = new LinkedHashMap<>(); map.forEach((key, value) -> result.put((String) key, value)); return result; }  }
Events { static Map<String, Object> ensureOrderedMapOfStringsToObjects(final Map<?, ?> map) { final Map<String, Object> result = new LinkedHashMap<>(); map.forEach((key, value) -> result.put((String) key, value)); return result; }   }
Events { static Map<String, Object> ensureOrderedMapOfStringsToObjects(final Map<?, ?> map) { final Map<String, Object> result = new LinkedHashMap<>(); map.forEach((key, value) -> result.put((String) key, value)); return result; }    }