### Question:
TupleDesc implements Serializable { public int getSize() { return items.stream().map(item->item.fieldType).map(Type::getLen).reduce(0,(sum,len)->sum+len); } TupleDesc(Type[] typeAr, String[] fieldAr);  TupleDesc(Type[] typeAr); Iterator<TDItem> iterator(); int numFields(); String getFieldName(int i); Type getFieldType(int i); int fieldNameToIndex(String name); int getSize(); static TupleDesc merge(TupleDesc td1, TupleDesc td2); boolean equals(Object o); int hashCode(); String toString(); public List<TDItem> items; }### Answer:
@Test public void getSize() { int[] lengths = new int[] { 1, 2, 1000 }; for (int len: lengths) { TupleDesc td = Utility.getTupleDesc(len); assertEquals(len * Type.INT_TYPE.getLen(), td.getSize()); } }