Fixed last C -> Java translation bug and added a unit test for checking the pre-sorted array edge case that would manifest the bug