@Test void testDoUpcast() { EventData<?> testEventData = new TestEventEntry(EXPECTED_PAYLOAD_TYPE, EXPECTED_REVISION); InitialEventRepresentation testRepresentation = new InitialEventRepresentation(testEventData, serializer); IntermediateEventRepresentation result = testSubject.doUpcast(testRepresentation); SerializedType resultType = result.getType(); assertEquals(UPCASTED_PAYLOAD_TYPE, resultType.getName()); assertEquals(UPCASTED_REVISION, resultType.getRevision()); }
@Override protected IntermediateEventRepresentation doUpcast(IntermediateEventRepresentation intermediateRepresentation) { return intermediateRepresentation.upcastPayload(upcastedType(), Object.class, Function.identity()); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected IntermediateEventRepresentation doUpcast(IntermediateEventRepresentation intermediateRepresentation) { return intermediateRepresentation.upcastPayload(upcastedType(), Object.class, Function.identity()); } }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected IntermediateEventRepresentation doUpcast(IntermediateEventRepresentation intermediateRepresentation) { return intermediateRepresentation.upcastPayload(upcastedType(), Object.class, Function.identity()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected IntermediateEventRepresentation doUpcast(IntermediateEventRepresentation intermediateRepresentation) { return intermediateRepresentation.upcastPayload(upcastedType(), Object.class, Function.identity()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); static Builder from(Class<?> payloadType, String revision); static Builder from(String payloadType, String revision); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected IntermediateEventRepresentation doUpcast(IntermediateEventRepresentation intermediateRepresentation) { return intermediateRepresentation.upcastPayload(upcastedType(), Object.class, Function.identity()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); static Builder from(Class<?> payloadType, String revision); static Builder from(String payloadType, String revision);  }