Column implements Iterable<T>, Serializable { public int size() { return data.size(); } Column(Class<T> dataType, T... data);  Column(Class<T> dataType, Iterable<T> data); T get(int row); int size(); boolean isNumeric(); Class<? extends Comparable<?>> getType(); double getStatistics(String key); @Override int hashCode(); @Override boolean equals(Object obj); @Override Iterator<T> iterator();  }
@Test public void testSizeReturnsTheNumberOfElements() { Column<Integer> column = new Column<>(Integer.class, 1, 2, 3, 4); int size = column.size(); assertEquals(4, size); }
@Test public void testSerializationPreservesSize() throws IOException, ClassNotFoundException { Column<Integer> original = new Column<>(Integer.class, 1, 2, 3); Column<Integer> deserialized = TestUtils.serializeAndDeserialize(original); assertEquals(original.size(), deserialized.size()); }