ConfigKeyListMapper { public String toBinding(List<ConfigKey> keys) { if (keys.isEmpty()) { return null; } else { String text = toText(keys); if ("[]".equals(text)) { return null; } else { return text; } } }  List<ConfigKey> fromResultSetOrEmpty(ResultSet rs, String column); String toBinding(List<ConfigKey> keys);  }
@Test public void emptyToNull() throws Exception { assertNull(mapper.toBinding(asList())); }