ToString { @SafeVarargs @SuppressWarnings("varargs") public static <K, V> Map<K, V> mapOf(final Map.Entry<? extends K, ? extends V>... entries) { if (null == entries) { return Collections.emptyMap(); } final Map<K, V> map = new LinkedHashMap<>(entries.length); Arrays.stream(entries) .filter(Objects::nonNull) .filter(e -> Objects.nonNull(e.getKey())) .forEach(e -> map.put(e.getKey(), e.getValue())); return Collections.unmodifiableMap(map); } private  ToString(); static Map<K, V> map(
            final K key1, final V value1); static Map<K, V> map(
            final K key1, final V value1,
            final K key2, final V value2); static Map<K, V> map(
            final K key1, final V value1,
            final K key2, final V value2,
            final K key3, final V value3); static Map<K, V> map(
            final K key1, final V value1,
            final K key2, final V value2,
            final K key3, final V value3,
            final K key4, final V value4); static Map<K, V> map(
            final K key1, final V value1,
            final K key2, final V value2,
            final K key3, final V value3,
            final K key4, final V value4,
            final K key5, final V value5); @SafeVarargs @SuppressWarnings("varargs") static Map<K, V> mapOf(final Map.Entry<? extends K, ? extends V>... entries); static Map.Entry<K, V> mapEntry(final K key, final V value); static String createToString(final Object object, final Map<String, Object> parameters, final String superToString); static String createToString(final Object object, final Map<String, Object> parameters);  }
@Test public void testMapEntry_Null() { final Map<String, Object> result = mapOf((Map.Entry<String, Object>[]) null); assertThat(result).isEmpty(); }
@Test public void testMapEntry_0args() { final Map<String, Object> result = mapOf(); assertThat(result).isEmpty(); }