@VisibleForTesting
  static long roundTo(long x, int multiple) {
    return ((x + multiple - 1) / multiple) * multiple;
  }
@Test
  public void testComplexObject() {
    ComplexObject<Object> l = new ComplexObject<Object>();
    l.add(new Object());
    l.add(new Object());
    l.add(new Object());

    long expectedSize = 0;
    // The complex object itself plus first and last refs.
    expectedSize += roundTo(mObjectHeaderSize + 2 * mReferenceHeaderSize, 8);
    // 3 Nodes - each with 3 object references.
    expectedSize += roundTo(mObjectHeaderSize + 3 * mReferenceHeaderSize, 8) * 3;
    // 3 vanilla objects contained in the node values.
    expectedSize += roundTo(mObjectHeaderSize, 8) * 3;

    assertSizeIs(expectedSize, l);
  }