InmemoryConfiguration implements Configuration { public void addProperty(String key, String value) { store.put(key, value); }  @Override Object getInternalProperty(String key); void addProperty(String key, String value); void addProperties(Map<String, String> properties); void setProperties(Map<String, String> properties); void clear();  }
@Test public void testGetInt() { memConfig.addProperty("a", "1"); Assertions.assertEquals(1, memConfig.getInt("a")); Assertions.assertEquals(Integer.valueOf(1), memConfig.getInteger("a", 2)); Assertions.assertEquals(2, memConfig.getInt("b", 2)); }
@Test public void getBoolean() { memConfig.addProperty("a", Boolean.TRUE.toString()); Assertions.assertTrue(memConfig.getBoolean("a")); Assertions.assertFalse(memConfig.getBoolean("b", false)); Assertions.assertTrue(memConfig.getBoolean("b", Boolean.TRUE)); }