Testing average cost basis calculation