MajorityElement { public int majorityElement(int[] nums) { return 0; }  int majorityElement(int[] nums);  }
@Test public void testremoveDuplicates() { int[] nums = new int[] {1, 1, 1, 2, 2, 2, 2, 2, 3}; int result = 2; Assert.assertEquals(result, testObjects[0].majorityElement(nums)); Assert.assertEquals(result, testObjects[1].majorityElement(nums)); Assert.assertEquals(result, testObjects[2].majorityElement(nums)); }