@Test public void testToRecordV2() { Record convertedRecord = DynamodbRecordTransformer.toRecordV2(record_event); Assertions.assertEquals(record_v2, convertedRecord); }
public static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record) { return Record.builder() .awsRegion(record.getAwsRegion()) .dynamodb( DynamodbStreamRecordTransformer.toStreamRecordV2(record.getDynamodb()) ) .eventID(record.getEventID()) .eventName(record.getEventName()) .eventSource(record.getEventSource()) .eventVersion(record.getEventVersion()) .userIdentity( record.getUserIdentity() != null ? DynamodbIdentityTransformer.toIdentityV2(record.getUserIdentity()) : null ) .build(); }
DynamodbRecordTransformer { public static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record) { return Record.builder() .awsRegion(record.getAwsRegion()) .dynamodb( DynamodbStreamRecordTransformer.toStreamRecordV2(record.getDynamodb()) ) .eventID(record.getEventID()) .eventName(record.getEventName()) .eventSource(record.getEventSource()) .eventVersion(record.getEventVersion()) .userIdentity( record.getUserIdentity() != null ? DynamodbIdentityTransformer.toIdentityV2(record.getUserIdentity()) : null ) .build(); } }
DynamodbRecordTransformer { public static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record) { return Record.builder() .awsRegion(record.getAwsRegion()) .dynamodb( DynamodbStreamRecordTransformer.toStreamRecordV2(record.getDynamodb()) ) .eventID(record.getEventID()) .eventName(record.getEventName()) .eventSource(record.getEventSource()) .eventVersion(record.getEventVersion()) .userIdentity( record.getUserIdentity() != null ? DynamodbIdentityTransformer.toIdentityV2(record.getUserIdentity()) : null ) .build(); }  }
DynamodbRecordTransformer { public static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record) { return Record.builder() .awsRegion(record.getAwsRegion()) .dynamodb( DynamodbStreamRecordTransformer.toStreamRecordV2(record.getDynamodb()) ) .eventID(record.getEventID()) .eventName(record.getEventName()) .eventSource(record.getEventSource()) .eventVersion(record.getEventVersion()) .userIdentity( record.getUserIdentity() != null ? DynamodbIdentityTransformer.toIdentityV2(record.getUserIdentity()) : null ) .build(); }  static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record); }
DynamodbRecordTransformer { public static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record) { return Record.builder() .awsRegion(record.getAwsRegion()) .dynamodb( DynamodbStreamRecordTransformer.toStreamRecordV2(record.getDynamodb()) ) .eventID(record.getEventID()) .eventName(record.getEventName()) .eventSource(record.getEventSource()) .eventVersion(record.getEventVersion()) .userIdentity( record.getUserIdentity() != null ? DynamodbIdentityTransformer.toIdentityV2(record.getUserIdentity()) : null ) .build(); }  static Record toRecordV2(final DynamodbEvent.DynamodbStreamRecord record);  }