Added tests for groupby