Class AbstractWireSerializingTestCase<T extends org.elasticsearch.common.io.stream.Writeable>

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.AbstractWireTestCase<T>
org.elasticsearch.test.AbstractWireSerializingTestCase<T>
Direct Known Subclasses:
AbstractDiffableWireSerializationTestCase, AbstractSerializingTestCase

public abstract class AbstractWireSerializingTestCase<T extends org.elasticsearch.common.io.stream.Writeable>
extends AbstractWireTestCase<T>
Standard test case for testing the wire serialization of subclasses of Writeable. See AbstractNamedWriteableTestCase for subclasses of NamedWriteable.
  • Constructor Details

    • AbstractWireSerializingTestCase

      public AbstractWireSerializingTestCase()
  • Method Details

    • instanceReader

      protected abstract org.elasticsearch.common.io.stream.Writeable.Reader<T> instanceReader()
      Returns a Writeable.Reader that can be used to de-serialize the instance
    • copyInstance

      protected final T copyInstance​(T instance, org.elasticsearch.Version version) throws java.io.IOException
      Copy the Writeable by round tripping it through StreamInput and StreamOutput.
      Specified by:
      copyInstance in class AbstractWireTestCase<T extends org.elasticsearch.common.io.stream.Writeable>
      Throws:
      java.io.IOException