@Test void convertEventToLegacyActivityWithActivityParameterKey() { DefaultEvent e = new DefaultEvent(); Map<String, String> parameters = new HashMap<>(); parameters.put(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY, "randomValue"); e.setParameters(parameters); LegacyEvent actual = this.activityPubLegacyEventConverter.convertEventToLegacyActivity(e); assertEquals("randomValue", actual.getParam3()); }
@Override public LegacyEvent convertEventToLegacyActivity(Event e) { LegacyEvent event = super.convertEventToLegacyActivity(e); if (e.getParameters().containsKey(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)) { event.setParam3(e.getParameters().get(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)); } return event; }
MentionsLegacyEventConverter extends AbstractLegacyEventConverter { @Override public LegacyEvent convertEventToLegacyActivity(Event e) { LegacyEvent event = super.convertEventToLegacyActivity(e); if (e.getParameters().containsKey(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)) { event.setParam3(e.getParameters().get(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)); } return event; } }
MentionsLegacyEventConverter extends AbstractLegacyEventConverter { @Override public LegacyEvent convertEventToLegacyActivity(Event e) { LegacyEvent event = super.convertEventToLegacyActivity(e); if (e.getParameters().containsKey(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)) { event.setParam3(e.getParameters().get(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)); } return event; }  }
MentionsLegacyEventConverter extends AbstractLegacyEventConverter { @Override public LegacyEvent convertEventToLegacyActivity(Event e) { LegacyEvent event = super.convertEventToLegacyActivity(e); if (e.getParameters().containsKey(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)) { event.setParam3(e.getParameters().get(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)); } return event; }  @Override LegacyEvent convertEventToLegacyActivity(Event e); @Override Event convertLegacyActivityToEvent(LegacyEvent e); }
MentionsLegacyEventConverter extends AbstractLegacyEventConverter { @Override public LegacyEvent convertEventToLegacyActivity(Event e) { LegacyEvent event = super.convertEventToLegacyActivity(e); if (e.getParameters().containsKey(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)) { event.setParam3(e.getParameters().get(MentionsRecordableEventConverter.MENTIONS_PARAMETER_KEY)); } return event; }  @Override LegacyEvent convertEventToLegacyActivity(Event e); @Override Event convertLegacyActivityToEvent(LegacyEvent e);  }