@Test
public void testGetOrDefault() {

    Configuration config = Configuration.current();
    DefaultConfigurationSnapshot snapshot = new DefaultConfigurationSnapshot(config,
            Arrays.asList("confkey1", "confkey2", "confkey3"));
    assertThat("javaconf-value1").isEqualTo(snapshot.getOrDefault("confkey1", "foo"));
    assertThat("javaconf-value2").isEqualTo(snapshot.getOrDefault("confkey2", "foo"));
    assertThat("javaconf-value2").isEqualTo(snapshot.getOrDefault("confkey2", String.class,"foo"));
    assertThat("javaconf-value3").isEqualTo(snapshot.getOrDefault("confkey3", "foo"));
    assertThat("foo").isEqualTo(snapshot.getOrDefault("confkey4", "foo"));
    assertThat("foo").isEqualTo(snapshot.getOrDefault("confkey4", String.class,"foo"));
}