public static class AcrossJVMSerializationFeature.AcrossJVMMockSerializationProxy
extends java.lang.Object
implements java.io.Serializable
When called in the constructor it will serialize the mock in a byte array using a
custom AcrossJVMSerializationFeature.MockitoMockObjectOutputStream
that
will annotate the mock class in the stream.
Other information are used in this class in order to facilitate deserialization.
Deserialization of the mock will be performed by the readResolve()
method via
the custom AcrossJVMSerializationFeature.MockitoMockObjectInputStream
that will be in charge of creating the mock class.
Constructor and Description |
---|
AcrossJVMSerializationFeature.AcrossJVMMockSerializationProxy(java.lang.Object mockitoMock)
Creates the wrapper that be used in the serialization stream.
|
public AcrossJVMSerializationFeature.AcrossJVMMockSerializationProxy(java.lang.Object mockitoMock) throws java.io.IOException
Immediately serializes the Mockito mock using specifically crafted
AcrossJVMSerializationFeature.MockitoMockObjectOutputStream
,
in a byte array.
mockitoMock
- The Mockito mock to serialize.java.io.IOException