class UpdateNamePayloadConverter implements PayloadConverter<UpdateName> {

  @Override
  public BytesValue convertToPayload(final UpdateName updateName) {
    logger.debug("Convert to payload from {}", updateName);
    final List<Object> args = new ArrayList<>();
    args.add(updateName.getName().getValue());
    args.add(updateName.getNextOwner().getValue());
    final Map<String, Object> map = new HashMap<>();
    map.put("Name", updateName.getOperationName());
    map.put("Args", args);
    return mapper.marshal(map);
  }

}