### Question:
ServiceUtil { public static final String getStringValue(Map map, String key) { return map.get(key) != null ? map.get(key).toString() : null; }  static final String getStringValue(Map map,
                                              String key);  }### Answer:
@Test public void getGetStringValue() { Map values = new HashMap(); String result = ServiceUtil.getStringValue(values, KEY); assertNull(result); Object obj = mock(Object.class); when(obj.toString()).thenReturn(STRING_VALUE); values.put(KEY, obj); result = ServiceUtil.getStringValue(values, KEY); assertEquals(STRING_VALUE, result); }