@Test
public void testGetOptionalStringFromInput() {

    Map<String, Object> input = new HashMap<String, Object>();
    input.put("key1", "value1");
    Map<String, Object> error = new HashMap<String, Object>();
    String defaultValue = "default";
    Assert.assertEquals("value1", listener.getOptionalStringFromInput(input, "key1", defaultValue, error));
    Assert.assertEquals(0, error.size());
    Assert.assertEquals(defaultValue, listener.getOptionalStringFromInput(input, "key2", defaultValue, error));
    Assert.assertEquals(0, error.size());
}