### Question:
ParameterMap { @SuppressWarnings("unchecked") public static String getKeyedString(@SuppressWarnings("rawtypes") final Map map, final String key, final String defValue) { if (map == null) return defValue; String value = defValue; Object oValue = map.get(key); if (oValue != null && oValue instanceof String) { value = (String) oValue; } else if (oValue != null) { value = oValue.toString(); map.put(key, value); } return value; }  @SuppressWarnings("unchecked") static long getKeyedLong(@SuppressWarnings("rawtypes") final Map map, final String key, final long defValue); static int getKeyedInteger(@SuppressWarnings("rawtypes") final Map map, final String key, final int defValue); @SuppressWarnings("unchecked") final static int[] getKeyedIntegerArray(@SuppressWarnings("rawtypes") final Map map, final String key, final int[] defValues); @SuppressWarnings("unchecked") static String getKeyedString(@SuppressWarnings("rawtypes") final Map map, final String key, final String defValue); @SuppressWarnings("unchecked") static boolean getKeyedBoolean(@SuppressWarnings("rawtypes") final Map map, final String key, final boolean defValue); static T getKeyedValue(final Map<String,T> map, final String key, final T defValue);  }### Answer:
@Test public void testGetKeyedString() { assertEquals("keyedString", ParameterMap.getKeyedString(m_map, "keyedString", "defaultValue")); assertEquals("defaultValue", ParameterMap.getKeyedString(m_map, "noSuchKey", "defaultValue")); assertEquals("defaultValue", ParameterMap.getKeyedString(null, "keyedString", "defaultValue")); }