@Test public void serdesDomain() { EventResourceReal eventResource = new EventResourceReal(null, new GsonSupport()); EventThing et = new EventThing("a", "b"); EventRecord<EventThing> er = new EventRecord<>("topic", et); Object o = eventResource.mapEventRecordToSerdes(er); assertEquals(et, o); }
@VisibleForTesting <T> Object mapEventRecordToSerdes(EventRecord<T> er) { return jsonSupport.transformEventRecord(er); }
EventResourceReal implements EventResource { @VisibleForTesting <T> Object mapEventRecordToSerdes(EventRecord<T> er) { return jsonSupport.transformEventRecord(er); } }
EventResourceReal implements EventResource { @VisibleForTesting <T> Object mapEventRecordToSerdes(EventRecord<T> er) { return jsonSupport.transformEventRecord(er); } EventResourceReal(NakadiClient client); @VisibleForTesting  EventResourceReal(NakadiClient client, JsonSupport jsonSupport); }
EventResourceReal implements EventResource { @VisibleForTesting <T> Object mapEventRecordToSerdes(EventRecord<T> er) { return jsonSupport.transformEventRecord(er); } EventResourceReal(NakadiClient client); @VisibleForTesting  EventResourceReal(NakadiClient client, JsonSupport jsonSupport); @Deprecated @Override EventResource scope(String scope); @Override EventResource retryPolicy(RetryPolicy retryPolicy); @Override EventResource flowId(final String flowId); @Override final Response send(String eventTypeName, Collection<T> events); @Override Response send(String eventTypeName, Collection<T> events,
      Map<String, Object> headers); @Override Response send(String eventTypeName, T event); @Override Response send(String eventTypeName, T event, Map<String, Object> headers); @Override BatchItemResponseCollection sendBatch(String eventTypeName, List<T> events); @Override BatchItemResponseCollection sendBatch(String eventTypeName, List<T> events,
      Map<String, Object> headers); }
EventResourceReal implements EventResource { @VisibleForTesting <T> Object mapEventRecordToSerdes(EventRecord<T> er) { return jsonSupport.transformEventRecord(er); } EventResourceReal(NakadiClient client); @VisibleForTesting  EventResourceReal(NakadiClient client, JsonSupport jsonSupport); @Deprecated @Override EventResource scope(String scope); @Override EventResource retryPolicy(RetryPolicy retryPolicy); @Override EventResource flowId(final String flowId); @Override final Response send(String eventTypeName, Collection<T> events); @Override Response send(String eventTypeName, Collection<T> events,
      Map<String, Object> headers); @Override Response send(String eventTypeName, T event); @Override Response send(String eventTypeName, T event, Map<String, Object> headers); @Override BatchItemResponseCollection sendBatch(String eventTypeName, List<T> events); @Override BatchItemResponseCollection sendBatch(String eventTypeName, List<T> events,
      Map<String, Object> headers);  }