Add test for appendsums function