RotateSearch { public int search2(int[] nums, int target) { if (nums == null || nums.length == 0) return -1; return search2(nums, target, 0, nums.length - 1); }  int search1(int[] nums, int target); int search2(int[] nums, int target); boolean isInList(int[] nums, int target);  }
@Test(dataProvider = "rotatedArray") public void test2(int[] nums, int target, int expectedIndex){ assertEquals(new RotateSearch().search2(nums, target), expectedIndex); }