MapUtils { public static <K, V> Map<K, V> of() { return Collections.emptyMap(); } private  MapUtils(); static Map<K, V> copyOf(Map<? extends K, ? extends V> map); static Map<K, V> of(); static Map<K, V> of(K k1, V v1); static Map<K, V> of(K k1, V v1, K k2, V v2); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10); static Map.Entry<K, V> entry(K key, V value); @SafeVarargs @SuppressWarnings("varargs") static Map<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries); @SuppressWarnings("unchecked") static Collector<T, ?, Map<K, U>> toUnmodifiableMap(
            Function<? super T, ? extends K> keyMapper,
            Function<? super T, ? extends U> valueMapper
    );  }
@Test public void ofEmptyIsEmpty() { assertThat(MapUtils.of(), anEmptyMap()); }
@Test public void ofOneIsOne() { Map<String, String> map = MapUtils.of("1", "A"); assertThat(map, hasEntry("1", "A")); }
@Test public void ofTwoIsTwo() { Map<String, String> map = MapUtils.of("1", "A", "2", "B"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); }
@Test public void ofThreeIsThree() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); }
@Test public void ofFourIsFour() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); }
@Test public void ofFiveIsFive() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); }
@Test public void ofSixIsSix() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E", "6", "F"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); assertThat(map, hasEntry("6", "F")); }
@Test public void ofSevenIsSeven() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E", "6", "F", "7", "G"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); assertThat(map, hasEntry("6", "F")); assertThat(map, hasEntry("7", "G")); }
@Test public void ofEightIsEight() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E", "6", "F", "7", "G", "8", "H"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); assertThat(map, hasEntry("6", "F")); assertThat(map, hasEntry("7", "G")); assertThat(map, hasEntry("8", "H")); }
@Test public void ofNineIsNine() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E", "6", "F", "7", "G", "8", "H", "9", "I"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); assertThat(map, hasEntry("6", "F")); assertThat(map, hasEntry("7", "G")); assertThat(map, hasEntry("8", "H")); assertThat(map, hasEntry("9", "I")); }
@Test public void ofTenIsTen() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D", "5", "E", "6", "F", "7", "G", "8", "H", "9", "I", "10", "J"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); assertThat(map, hasEntry("5", "E")); assertThat(map, hasEntry("6", "F")); assertThat(map, hasEntry("7", "G")); assertThat(map, hasEntry("8", "H")); assertThat(map, hasEntry("9", "I")); assertThat(map, hasEntry("10", "J")); }