### Question:
InputParamUtil { public static boolean getOptionalBooleanParam(Map<String, String> parameters, String paramKey) { String param = InputParamUtil.getOptionalParam(parameters, paramKey); return Boolean.parseBoolean(param); }  static String getRequiredParam(Map<String, String> parameters, String parameterKey); static String getOptionalParam(Map<String, String> parameters, String parameterKey, String defaultValue); static String getOptionalParam(Map<String, String> parameters, String parameterKey); static boolean getOptionalBooleanParam(Map<String, String> parameters, String paramKey); static boolean getOptionalBooleanParam(Map<String, String> parameters, String paramKey, String defaultValue);  }### Answer:
@Test public void testGetOptionalBooleanParamWherePresent() { Map<String, String> params = new HashMap<String, String>(){{ put("paramKey", "true"); }}; assertTrue(InputParamUtil.getOptionalBooleanParam(params, "paramKey")); }
@Test public void testGetOptionalBooleanParamWhereNotPresent() { Map<String, String> params = new HashMap<String, String>(){{ }}; assertFalse(InputParamUtil.getOptionalBooleanParam(params, "paramKey")); }