### Question:
PojoMap extends HashMap<String, Object> implements YAMLConverter.YAMLTagged { public Boolean getBoolean(String inParamName) throws InvalidParameterException { try { return (Boolean) getProperty(inParamName); } catch (final ClassCastException bad) { throw new InvalidParameterException(APIErrorMessage.NOT_A_BOOLEAN, inParamName); } } PojoMap(int capacity);  PojoMap(Map<String, Object> inSimpleMap); V getProperty(String inPropertyPath); void createProperty(String inPropertyPath, Object inValue); String getString(String inParamName); String getString(String inParamName, boolean isMandatory); String getString(String inParamName, String inDefaultValue); Date getDate(String inParamName); Date getDate(String inParamName, boolean isMandatory); Date getDate(String inParamName, Date inDefaultValue); Integer getInteger(String inParamName); Integer getInt(String inParamName, boolean isMandatory); int getInt(String inParamName, int inDefaultValue); Long getLong(String inParamName); long getLong(String inParamName, boolean isMandatory); long getLong(String inParamName, long inDefaultValue); byte[] getBytes(String inParamName); byte[] getBytes(String inParamName, boolean isMandatory); Boolean getBoolean(String inParamName); boolean getBoolean(String inParamName, boolean inDefaultValue); List<V> getList(String inParamName); List<V> getList(String inParamName, boolean isMandatory); List<V> getList(String inParamName, List<V> inDefaultValue); Map<String, V> getMap(String inParamName); PojoMap getPojoMap(String inParamName); PojoMap getPojoMap(String inParamName, boolean isMandatory); Map<String, V> getMap(String inParamName, boolean isMandatory); PojoMap getPojoMap(String inParamName, Map inDefaultValue); static PojoMap fromJSON(String inJSONString); static PojoMap fromXML(String inXMLString); static PojoMap fromYAML(String inYAMLString); String toJSON(); String toXML(); String toYAML(); Set<String> getSortedParamNames(); boolean containsOnlyPrimitiveTypes(); NameValuePair[] asNameValuePairs(); String toQueryString(); void putNullValue(String inKey); final String getYAMLTag(); static final PojoMap EMPTY_MAP; }### Answer:
@Test public void testGetBooleanString() { final PojoMap params = new PojoMap(getPojoParams()); try { Assert.assertEquals(params.getBoolean("bool_et_bil"), new Boolean(true)); Assert.assertNull(params.getBoolean("no_bool_here")); } catch (final InvalidParameterException e) { e.printStackTrace(); Assert.fail(e.getMessage()); } try { params.getBoolean("string_here"); } catch (final InvalidParameterException e) { Assert.assertTrue(true); } }
@Test public void testGetBooleanStringBoolean() { final PojoMap params = new PojoMap(getPojoParams()); try { Assert.assertEquals(params.getBoolean("bool_et_bil", true), new Boolean(true)); } catch (final InvalidParameterException e) { e.printStackTrace(); Assert.fail(e.getMessage()); } try { params.getBoolean("boulet_bil", true); } catch (final InvalidParameterException e) { Assert.assertTrue(true); } try { params.getBoolean("string_here"); } catch (final InvalidParameterException e) { Assert.assertTrue(true); } }