}
@Test
public void testPactNull() {
final NullValue pn1 = new NullValue();
final NullValue pn2 = new NullValue();
Assert.assertEquals("PactNull not equal to other PactNulls.", pn1, pn2);
Assert.assertEquals("PactNull not equal to other PactNulls.", pn2, pn1);
Assert.assertFalse("PactNull equal to other null.", pn1.equals(null));
// test serialization
final NullValue pn = new NullValue();
final int numWrites = 13;
try {
// write it multiple times
for (int i = 0; i < numWrites; i++) {
pn.write(new OutputViewDataOutputStreamWrapper(mOut));
}
// read it multiple times
for (int i = 0; i < numWrites; i++) {
pn.read(new InputViewDataInputStreamWrapper(mIn));
}
Assert.assertEquals("Reading PactNull does not consume the same data as was written.", mIn.available(), 0);
}
catch (IOException ioex) {