void () { int[] ints1 = new int[]{1, 2, 3}; int[] ints2 = new int[]{3, 2, 1, 2, 2}; int[][] reindexed = myReindexer.discardUnique(ints1, ints2); assertTrue(Arrays.equals(ints1, reindexed[0])); assertTrue(Arrays.equals(ints2, reindexed[1])); for (int i = 0; i < 3; i++) { assertEquals(i, myReindexer.restoreIndex(i, 0)); assertEquals(i, myReindexer.restoreIndex(i, 1)); } assertEquals(3, myReindexer.restoreIndex(3, 1)); assertEquals(4, myReindexer.restoreIndex(4, 1)); }