Class OutputVerifier


  • @Deprecated
    public class OutputVerifier
    extends java.lang.Object
    Deprecated.
    Since 2.4 use methods of TestOutputTopic and standard assertion libraries instead
    Helper class to verify topology result records.
    See Also:
    TopologyTestDriver
    • Constructor Summary

      Constructors 
      Constructor Description
      OutputVerifier()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static <K,​V>
      void
      compareKeyValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, K expectedKey, V expectedValue)
      Deprecated.
      Compares a ProducerRecord with the provided key and value and throws an AssertionError if the ProducerRecord's key or value is not equal to the expected key or value.
      static <K,​V>
      void
      compareKeyValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the keys and values of two ProducerRecord's and throws an AssertionError if the keys or values are not equal to each other.
      static <K,​V>
      void
      compareKeyValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, K expectedKey, V expectedValue, org.apache.kafka.common.header.Headers expectedHeaders)
      Deprecated.
      Compares a ProducerRecord with the provided key, value, and headers and throws an AssertionError if the ProducerRecord's key, value, or headers is not equal to the expected key, value, or headers.
      static <K,​V>
      void
      compareKeyValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the keys, values, and headers of two ProducerRecord's and throws an AssertionError if the keys, values, or headers are not equal to each other.
      static <K,​V>
      void
      compareKeyValueHeadersTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, K expectedKey, V expectedValue, org.apache.kafka.common.header.Headers expectedHeaders, long expectedTimestamp)
      Deprecated.
      Compares a ProducerRecord with the provided key, value, headers, and timestamp and throws an AssertionError if the ProducerRecord's key, value, headers, or timestamp is not equal to the expected key, value, headers, or timestamp.
      static <K,​V>
      void
      compareKeyValueHeadersTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the keys, values, headers, and timestamp of two ProducerRecord's and throws an AssertionError if the keys, values, headers, or timestamps are not equal to each other.
      static <K,​V>
      void
      compareKeyValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, K expectedKey, V expectedValue, long expectedTimestamp)
      Deprecated.
      Compares a ProducerRecord with the provided key, value, and timestamp and throws an AssertionError if the ProducerRecord's key, value, or timestamp is not equal to the expected key, value, or timestamp.
      static <K,​V>
      void
      compareKeyValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the keys, values, and timestamps of two ProducerRecord's and throws an AssertionError if the keys, values, or timestamps are not equal to each other.
      static <K,​V>
      void
      compareValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the values of two ProducerRecord's and throws an AssertionError if they are not equal to each other.
      static <K,​V>
      void
      compareValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, V expectedValue)
      Deprecated.
      Compares a ProducerRecord with the provided value and throws an AssertionError if the ProducerRecord's value is not equal to the expected value.
      static <K,​V>
      void
      compareValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the values and headers of two ProducerRecord's and throws an AssertionError if the values or headers are not equal to each other.
      static <K,​V>
      void
      compareValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, V expectedValue, org.apache.kafka.common.header.Headers expectedHeaders)
      Deprecated.
      Compares a ProducerRecord with the provided value and headers and throws an AssertionError if the ProducerRecord's value or headers is not equal to the expected value or headers.
      static <K,​V>
      void
      compareValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
      Deprecated.
      Compares the values and timestamps of two ProducerRecord's and throws an AssertionError if the values or timestamps are not equal to each other.
      static <K,​V>
      void
      compareValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record, V expectedValue, long expectedTimestamp)
      Deprecated.
      Compares a ProducerRecord with the provided value and timestamp and throws an AssertionError if the ProducerRecord's value or timestamp is not equal to the expected value or timestamp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OutputVerifier

        public OutputVerifier()
        Deprecated.
    • Method Detail

      • compareValue

        public static <K,​V> void compareValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                    V expectedValue)
                                             throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided value and throws an AssertionError if the ProducerRecord's value is not equal to the expected value.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedValue - the expected value of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's value is not equal to expectedValue
      • compareValue

        public static <K,​V> void compareValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                    org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                             throws java.lang.AssertionError
        Deprecated.
        Compares the values of two ProducerRecord's and throws an AssertionError if they are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's value is not equal to expectedRecord's value
      • compareKeyValue

        public static <K,​V> void compareKeyValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                       K expectedKey,
                                                       V expectedValue)
                                                throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided key and value and throws an AssertionError if the ProducerRecord's key or value is not equal to the expected key or value.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedKey - the expected key of the ProducerRecord
        expectedValue - the expected value of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's key or value is not equal to expectedKey or expectedValue
      • compareKeyValue

        public static <K,​V> void compareKeyValue​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                       org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                throws java.lang.AssertionError
        Deprecated.
        Compares the keys and values of two ProducerRecord's and throws an AssertionError if the keys or values are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's key or value is not equal to expectedRecord's key or value
      • compareValueTimestamp

        public static <K,​V> void compareValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                             V expectedValue,
                                                             long expectedTimestamp)
                                                      throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided value and timestamp and throws an AssertionError if the ProducerRecord's value or timestamp is not equal to the expected value or timestamp.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedValue - the expected value of the ProducerRecord
        expectedTimestamp - the expected timestamps of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's value or timestamp is not equal to expectedValue or expectedTimestamp
      • compareValueTimestamp

        public static <K,​V> void compareValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                             org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                      throws java.lang.AssertionError
        Deprecated.
        Compares the values and timestamps of two ProducerRecord's and throws an AssertionError if the values or timestamps are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's value or timestamp is not equal to expectedRecord's value or timestamp
      • compareKeyValueTimestamp

        public static <K,​V> void compareKeyValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                                K expectedKey,
                                                                V expectedValue,
                                                                long expectedTimestamp)
                                                         throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided key, value, and timestamp and throws an AssertionError if the ProducerRecord's key, value, or timestamp is not equal to the expected key, value, or timestamp.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedKey - the expected key of the ProducerRecord
        expectedValue - the expected value of the ProducerRecord
        expectedTimestamp - the expected timestamp of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, timestamp is not equal to expectedKey, expectedValue, or expectedTimestamps
      • compareKeyValueTimestamp

        public static <K,​V> void compareKeyValueTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                                org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                         throws java.lang.AssertionError
        Deprecated.
        Compares the keys, values, and timestamps of two ProducerRecord's and throws an AssertionError if the keys, values, or timestamps are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, or timestamp is not equal to expectedRecord's key, value, or timestamp
      • compareValueHeaders

        public static <K,​V> void compareValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                           V expectedValue,
                                                           org.apache.kafka.common.header.Headers expectedHeaders)
                                                    throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided value and headers and throws an AssertionError if the ProducerRecord's value or headers is not equal to the expected value or headers.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedValue - the expected value of the ProducerRecord
        expectedHeaders - the expected headers of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's value or headers is not equal to expectedValue or expectedHeaders
      • compareValueHeaders

        public static <K,​V> void compareValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                           org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                    throws java.lang.AssertionError
        Deprecated.
        Compares the values and headers of two ProducerRecord's and throws an AssertionError if the values or headers are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's value or headers is not equal to expectedRecord's value or headers
      • compareKeyValueHeaders

        public static <K,​V> void compareKeyValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                              K expectedKey,
                                                              V expectedValue,
                                                              org.apache.kafka.common.header.Headers expectedHeaders)
                                                       throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided key, value, and headers and throws an AssertionError if the ProducerRecord's key, value, or headers is not equal to the expected key, value, or headers.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedKey - the expected key of the ProducerRecord
        expectedValue - the expected value of the ProducerRecord
        expectedHeaders - the expected headers of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, headers is not equal to expectedKey, expectedValue, or expectedHeaders
      • compareKeyValueHeaders

        public static <K,​V> void compareKeyValueHeaders​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                              org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                       throws java.lang.AssertionError
        Deprecated.
        Compares the keys, values, and headers of two ProducerRecord's and throws an AssertionError if the keys, values, or headers are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, or headers is not equal to expectedRecord's key, value, or headers
      • compareKeyValueHeadersTimestamp

        public static <K,​V> void compareKeyValueHeadersTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                                       K expectedKey,
                                                                       V expectedValue,
                                                                       org.apache.kafka.common.header.Headers expectedHeaders,
                                                                       long expectedTimestamp)
                                                                throws java.lang.AssertionError
        Deprecated.
        Compares a ProducerRecord with the provided key, value, headers, and timestamp and throws an AssertionError if the ProducerRecord's key, value, headers, or timestamp is not equal to the expected key, value, headers, or timestamp.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedKey - the expected key of the ProducerRecord
        expectedValue - the expected value of the ProducerRecord
        expectedHeaders - the expected headers of the ProducerRecord
        expectedTimestamp - the expected timestamp of the ProducerRecord
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, headers is not equal to expectedKey, expectedValue, or expectedHeaders
      • compareKeyValueHeadersTimestamp

        public static <K,​V> void compareKeyValueHeadersTimestamp​(org.apache.kafka.clients.producer.ProducerRecord<K,​V> record,
                                                                       org.apache.kafka.clients.producer.ProducerRecord<K,​V> expectedRecord)
                                                                throws java.lang.AssertionError
        Deprecated.
        Compares the keys, values, headers, and timestamp of two ProducerRecord's and throws an AssertionError if the keys, values, headers, or timestamps are not equal to each other.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        record - a output ProducerRecord for verification
        expectedRecord - a ProducerRecord for verification
        Throws:
        java.lang.AssertionError - if ProducerRecord's key, value, headers, or timestamp is not equal to expectedRecord's key, value, headers, or timestamp