public static Boolean getBoolean(Map<String, Object> map, String name) {
    return getValue(map, name, Boolean.class, "a boolean");
  }
@Test
  public void testGetBooleanParameter() throws Exception {
    Map<String, Object> o = makeCloudDictionary();

    Assert.assertTrue(getBoolean(o, "singletonBooleanKey", false));
    Assert.assertFalse(getBoolean(o, "missingKey", false));

    try {
      getBoolean(o, "emptyKey", false);
      Assert.fail("should have thrown an exception");
    } catch (Exception exn) {
      assertThat(exn.toString(), Matchers.containsString("not a boolean"));
    }
  }