Add unit tests for sorting by angle