Class CloudEventsConverterTest

java.lang.Object
io.debezium.converters.CloudEventsConverterTest

public class CloudEventsConverterTest extends Object
  • Constructor Details

    • CloudEventsConverterTest

      public CloudEventsConverterTest()
  • Method Details

    • shouldConvertToCloudEventsInJson

      public static void shouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction)
    • shouldConvertToCloudEventsInJson

      public static void shouldConvertToCloudEventsInJson(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction, Consumer<com.fasterxml.jackson.databind.JsonNode> furtherAssertions)
    • shouldConvertToCloudEventsInJsonWithDataAsAvro

      public static void shouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, boolean hasTransaction)
    • shouldConvertToCloudEventsInJsonWithDataAsAvro

      public static void shouldConvertToCloudEventsInJsonWithDataAsAvro(org.apache.kafka.connect.source.SourceRecord record, String fieldName, boolean hasTransaction)
    • shouldConvertToCloudEventsInAvro

      public static void shouldConvertToCloudEventsInAvro(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName, boolean hasTransaction)
    • shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeaders

      public static void shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeaders

      public static void shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeaders(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType

      public static void shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType(org.apache.kafka.connect.source.SourceRecord record, String connectorName, String serverName) throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithoutExtensionAttributes

      public static void shouldConvertToCloudEventsInJsonWithoutExtensionAttributes(org.apache.kafka.connect.source.SourceRecord record) throws Exception
      Throws:
      Exception
    • shouldThrowExceptionWhenDeserializingNotCloudEventJson

      public static void shouldThrowExceptionWhenDeserializingNotCloudEventJson(org.apache.kafka.connect.source.SourceRecord record) throws Exception
      Throws:
      Exception
    • shouldThrowExceptionWhenDeserializingNotCloudEventAvro

      public static void shouldThrowExceptionWhenDeserializingNotCloudEventAvro(org.apache.kafka.connect.source.SourceRecord record) throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName

      public static void shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName(org.apache.kafka.connect.source.SourceRecord record)
    • convertHeadersFor

      private static org.apache.kafka.common.header.internals.RecordHeaders convertHeadersFor(org.apache.kafka.connect.source.SourceRecord record) throws IOException
      Throws:
      IOException
    • prettyJson

      private static String prettyJson(com.fasterxml.jackson.databind.JsonNode json)