public String getTopicName(AsyncMockDefinition definition, EventMessage eventMessage) {
      // Produce service name part of topic name.
      String serviceName = definition.getOwnerService().getName().replace(" ", "");
      serviceName = serviceName.replace("-", "");

      // Produce version name part of topic name.
      String versionName = definition.getOwnerService().getVersion().replace(" ", "");

      // Produce operation name part of topic name.
      String operationName = ProducerManager.getDestinationOperationPart(definition.getOperation(), eventMessage);
      operationName = operationName.replace('/', '-');

      // Aggregate the 3 parts using '_' as delimiter.
      return serviceName + "-" + versionName + "-" + operationName;
   }
@Test
   void testGetDynamicTopicName() {
      KafkaProducerManager producerManager = new KafkaProducerManager();

      Service service = new Service();
      service.setName("Streetlights API");
      service.setVersion("0.1.0");

      Operation operation = new Operation();
      operation.setName("RECEIVE receiveLightMeasurement");
      operation.setMethod("RECEIVE");
      operation.setDispatcher("URI_PARTS");
      operation.setDispatcherRules("/streetlightId");
      operation.setResourcePaths(Set.of("smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured",
            "smartylighting.streetlights.1.0.event.da059782-3ad0-4e45-88ce-ef3392bc7797.lighting.measured"));
      service.addOperation(operation);

      EventMessage eventMessage = new EventMessage();
      eventMessage.setName("Sample");
      eventMessage.setDispatchCriteria("streetlightId=da059782-3ad0-4e45-88ce-ef3392bc7797");
      List<EventMessage> eventsMessages = List.of(eventMessage);

      AsyncMockDefinition definition = new AsyncMockDefinition(service, operation, eventsMessages);

      String topicName = producerManager.getTopicName(definition, eventMessage);
      assertEquals(
            "StreetlightsAPI-0.1.0-smartylighting.streetlights.1.0.event.da059782-3ad0-4e45-88ce-ef3392bc7797.lighting.measured",
            topicName);
   }