Add test for median function