public void send(String source, OutgoingMessageEnvelope envelope) {
      if (mockConsumer != null) {
        MockCoordinatorStreamWrappedConsumer consumer = (MockCoordinatorStreamWrappedConsumer) mockConsumer;
        SystemStreamPartition ssp = new SystemStreamPartition(envelope.getSystemStream(), new Partition(0));
        consumer.register(ssp, "");
        try {
          consumer.addMessageEnvelope(new IncomingMessageEnvelope(ssp, "", envelope.getKey(), envelope.getMessage()));
        } catch (IOException | InterruptedException e) {
          e.printStackTrace();
        }
      } else {
        envelopes.add(envelope);
      }
    }
Returns a single partition admin that pretends to create a coordinator
stream.
samza-core/src/test/java/org/apache/samza/coordinator/stream/MockCoordinatorStreamSystemFactory.java