PowerOfTwo { public boolean isPowerOfTwo(int n) { return false; }  boolean isPowerOfTwo(int n);  }
@Test public void testIsPowerOfTwo() { int[] nums = new int[] {0, 2, -4, 11, 16, -6}; boolean[] result = {false, true, false, false, true, false}; for (int i = 0; i < nums.length; i++) { Assert.assertEquals(result[i], testObjects[0].isPowerOfTwo(nums[i])); Assert.assertEquals(result[i], testObjects[1].isPowerOfTwo(nums[i])); } }