@Test
 public void testCommon()
 	throws Exception
 {
  byte[] expectedZero = concat(new byte[1] /* magic placeholder */,
    fragment(0, new byte[] { 0 }), new byte[] { -0x80, 0, 0, 0, 0, 1 });
  byte[] expectedCommon = new byte[] { COMMON_MAGIC, 0, 0, 12, -0x80, 0, 0, 0, 0, 1 };
  for (byte[] withOwnData : new byte[][] { ONE_TO_THIRTEEN, ZERO_TO_TWELVE })
  {
   for (int i = 0; i < 2; i++)
   {
    InputStream in1 = new ByteArrayInputStream(0 == i ? withOwnData : ONE_TO_TWELVE);
    InputStream in2 = new ByteArrayInputStream(0 == i ? ONE_TO_TWELVE : withOwnData);
    if (0 == i)
    {
     expectedZero[0] = REVERSE_MAGIC;
     if (0 == withOwnData[0])
     {
      expectedCommon[1] = 1; // reverse offset in common sequence
      expectedZero[1] = 0; // fragment offset in forward sequence
      expectedZero[3] = 0; // value in forward sequence
     }
     else
     {
      expectedCommon[1] = 0; // reverse offset in common sequence
      expectedZero[1] = 12; // fragment offset in forward sequence
      expectedZero[3] = 13; // value in forward sequence
     }
     expectedCommon[2] = 0; // forward offset in common sequence
     compare(in1, in2, expectedZero, 1L, EMPTY_FORWARD, 0L, expectedCommon);
    }
    else
    {
     expectedZero[0] = FORWARD_MAGIC;
     expectedCommon[1] = 0; // reverse offset in common sequence
     if (0 == withOwnData[0])
     {
      expectedCommon[2] = 1; // forward offset in common sequence
      expectedZero[1] = 0; // fragment offset in forward sequence
      expectedZero[3] = 0; // value in reverse sequence
     }
     else
     {
      expectedCommon[2] = 0; // forward offset in common sequence
      expectedZero[1] = 12; // fragment offset in forward sequence
      expectedZero[3] = 13; // value in reverse sequence
     }
     compare(in1, in2, EMPTY_REVERSE, 0L, expectedZero, 1L, expectedCommon);
    }
    resetDeltas();
   }
  }
 }