unit test for initial grouping of shares