Map<String,Object> m = new HashMap<String, Object>();
m.put("TEST", testObject);
m.put("String", "1000");
m.put("Int2", new Integer(1000));
m.put("Int3", 1000);
ConfigurationParameters options = ConfigurationParameters.of(m);
assertNotNull(options.getConfigValue("TEST", null, null));
assertNotNull(options.getConfigValue("TEST", null, TestObject.class));
assertEquals(testObject, options.getConfigValue("TEST", null, null));
assertEquals(testObject, options.getConfigValue("TEST", null, TestObject.class));
assertEquals(testObject, options.getConfigValue("TEST", testObject, null));
assertEquals(testObject, options.getConfigValue("TEST", testObject, TestObject.class));
assertEquals("t", options.getConfigValue("TEST", "defaultString", null));
assertEquals("t", options.getConfigValue("TEST", "defaultString", String.class));
assertEquals("1000", options.getConfigValue("String", null, null));
assertEquals("1000", options.getConfigValue("String", null, String.class));
assertEquals(int1000, options.getConfigValue("String", new Integer(10), null));
assertEquals(int1000, options.getConfigValue("String", new Integer(10), Integer.class));
assertEquals(new Long(1000), options.getConfigValue("String", new Long(10), null));
assertEquals(new Long(1000), options.getConfigValue("String", new Long(10), Long.class));
assertEquals("1000", options.getConfigValue("String", "10", null));
assertEquals("1000", options.getConfigValue("String", "10", String.class));
assertEquals(int1000, options.getConfigValue("Int2", null, null));
assertEquals(int1000, options.getConfigValue("Int2", new Integer(10), null));
assertEquals("1000", options.getConfigValue("Int2", "1000", null));
assertEquals(1000, options.getConfigValue("Int3", null, null));
assertEquals(int1000, options.getConfigValue("Int3", new Integer(10), null));
assertEquals("1000", options.getConfigValue("Int3", "1000", null));
}