Unit tests for projection and sort