Add test for top_n function

To make sure it returns n rows.