@Test public void testBusinessEventCanMarshalASpan() { TypeLiteral<BusinessEventMapped<ID>> eventType = new TypeLiteral<BusinessEventMapped<ID>>() { }; StreamBatchRecord<BusinessEventMapped<ID>> sbr = support.lineToEventStreamBatchRecord(spanCtxBusinessLine, eventType.type(), new LoggingStreamOffsetObserver()); BusinessEventMapped<ID> event = sbr.streamBatch().events().get(0); final Map<String, String> spanCtx = event.metadata().spanCtx(); assertEquals(spanCtx.get("ot-tracer-spanid"), "span_01cvssvfcm346zn4nn6c7xmc49"); assertEquals(spanCtx.get("ot-tracer-traceid"), "trc_01cvsskn8542fh1zmxc6018vb4"); assertEquals(spanCtx.get("ot-baggage-one"), "two"); assertEquals(spanCtx.get("ot-tag-three"), "four"); assertEquals(spanCtx.get("ot-childof"), "span_01cvsszwkkees9ag0szyg9t4tw"); }
public <T> StreamBatchRecord<T> lineToEventStreamBatchRecord( String line, Type eventType, StreamOffsetObserver observer) { return new StreamBatchRecordReal<>(marshalEventStreamBatch(line, eventType), observer); }
JsonBatchSupport { public <T> StreamBatchRecord<T> lineToEventStreamBatchRecord( String line, Type eventType, StreamOffsetObserver observer) { return new StreamBatchRecordReal<>(marshalEventStreamBatch(line, eventType), observer); } }
JsonBatchSupport { public <T> StreamBatchRecord<T> lineToEventStreamBatchRecord( String line, Type eventType, StreamOffsetObserver observer) { return new StreamBatchRecordReal<>(marshalEventStreamBatch(line, eventType), observer); } JsonBatchSupport(JsonSupport jsonSupport); }
JsonBatchSupport { public <T> StreamBatchRecord<T> lineToEventStreamBatchRecord( String line, Type eventType, StreamOffsetObserver observer) { return new StreamBatchRecordReal<>(marshalEventStreamBatch(line, eventType), observer); } JsonBatchSupport(JsonSupport jsonSupport); StreamBatchRecord<T> lineToEventStreamBatchRecord(
      String line, Type eventType, StreamOffsetObserver observer); StreamBatchRecord<T> lineToSubscriptionStreamBatchRecord(
      String line, Type type, StreamOffsetObserver observer, String xNakadiStreamId,
      String subscriptionId); }
JsonBatchSupport { public <T> StreamBatchRecord<T> lineToEventStreamBatchRecord( String line, Type eventType, StreamOffsetObserver observer) { return new StreamBatchRecordReal<>(marshalEventStreamBatch(line, eventType), observer); } JsonBatchSupport(JsonSupport jsonSupport); StreamBatchRecord<T> lineToEventStreamBatchRecord(
      String line, Type eventType, StreamOffsetObserver observer); StreamBatchRecord<T> lineToSubscriptionStreamBatchRecord(
      String line, Type type, StreamOffsetObserver observer, String xNakadiStreamId,
      String subscriptionId);  }