@Test public void flatteningToMap_withDuplicates() {

  ImmutableList<Translation> translations = ImmutableList.of(
      new Translation(ImmutableMap.of(1, "one")),
      new Translation(ImmutableMap.of(2, "two", 1, "1")));
  assertThrows(
      IllegalStateException.class,
      () -> translations.stream()
          .map(Translation::dictionary)
          .collect(flattening(Map::entrySet, toMap())));
}