setBean(bean);
List<KeyValuePair> pairs = config.attributesAsList();
ConfigTree parent = config.getParent();
if (parent != null) {
List<KeyValuePair> parentAttributes = parent.attributesAsList();
for (KeyValuePair attr : parentAttributes) {
String newKeyName = optionalFields.get(attr.getKey());
if (newKeyName != null) {
pairs.add(new KeyValuePair(newKeyName, attr.getValue()));
}