### Question:
ParameterUtil { public static Map.Entry<String, String> toMapEntryWithOptionalValue(final String value, final String separator) { return toSimpleEntry(value, separator, true); } private  ParameterUtil(); static Map.Entry<String, String> toMapEntryWithOptionalValue(final String value, final String separator); static Map.Entry<String, String> toMapEntry(final String value, final String separator); static Map<String, String> toMap(final String[] values, final String separator); static Map<String, String> toMap(final String[] values, final String separator,
                                            final boolean allowValuelessKeys, final String defaultValue); @SuppressWarnings("squid:S3776") static Map<String, String> toMap(final String[] values, final String separator,
                                            final boolean allowValuelessKeys, final String defaultValue,
                                            final boolean allowMultipleSeparators); static Map<String, String[]> toMap(final String[] values, final String mapSeparator, final String listSeparator); static Map<String, String[]> toMap(final String[] values, final String mapSeparator, final String listSeparator,
                                              final boolean allowValuelessKeys, final String defaultValue); static List<Pattern> toPatterns(String[] values);  }### Answer:
@Test public void testToMapEntryWithOptionalValueWithOnlyKey() { String value = "key"; String separator = ":"; Map.Entry<String, String> expResult = new SimpleEntry<>(value, null); Map.Entry<String, String> result = ParameterUtil.toMapEntryWithOptionalValue(value, separator); assertEquals(expResult, result); }