CanVector implements Iterable<Can<T>>, Serializable { public CanVector<T> set(int index, @NonNull Can<T> can) { cans.set(index, can); return this; } CanVector(int size); int size(); @Override Iterator<Can<T>> iterator(); Can<T> get(int index); CanVector<T> set(int index, @NonNull Can<T> can); static CanVector<T> empty(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test void populatedCanVector_shouldBeSerializable() { val vector = new CanVector<String>(3); vector.set(0, Can.<String>of("hi")); vector.set(1, Can.<String>of("hi", "there")); SerializationTester.assertEqualsOnRoundtrip(Can.<String>of("hi")); }