If this is a map and not a list of properties (difference being the same "key" won't appear twice in a map), then this should be

context.getResult().get(entry.getKey()).set(result);

If it's a list of properties, then a different approach to the METHODS AttributeDefinition is needed.