### Question:
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);  }### Answer:
@Test void convertEventToLegacyActivityWithoutActivityParameterKey() { DefaultEvent e = new DefaultEvent(); LegacyEvent actual = this.activityPubLegacyEventConverter.convertEventToLegacyActivity(e); assertEquals("", actual.getParam3()); }
@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()); }