### Question:
BaseTaskResult implements TaskResult<A> { @Override public int size() { return this._size; } BaseTaskResult(Object toWrap, boolean protect); @Override Object[] asArray(); @Override Exception exception(); @Override String output(); @Override final TaskResult<A> setException(Exception e); @Override final TaskResult<A> setOutput(String output); @Override final TaskResult<A> setNotifications(Buffer buf); @Override TaskResult<A> fillWith(TaskResult<A> source); @Override TaskResultIterator iterator(); @Override A get(int index); @Override synchronized TaskResult<A> set(int index, A input); @Override TaskResult<A> allocate(int index); @Override TaskResult<A> add(A input); @Override TaskResult<A> clear(); @Override TaskResult<A> clone(); @Override void free(); @Override int size(); @Override String toString(); @Override synchronized final void saveToBuffer(Buffer buffer); @Override final Buffer notifications(); void loadRefs(final Graph graph, final L3GMap<List<Tuple<Object[], Integer>>> collector, final Callback<Boolean> loaded); int load(final Buffer buffer, final int begin, final Graph graph, final L3GMap<List<Tuple<Object[], Integer>>> collector);  }### Answer:
@Test public void sizeTest() { BaseTaskResult res = new BaseTaskResult(null, false); res.set(1, ""); res.set(0, ""); Assert.assertEquals(2, res.size()); }