Differ implements Serializable { @VisibleForTesting static void validateRange(BigInteger start, BigInteger end, TokenHelper tokens) { Verify.verify(start != null && end != null, "Invalid token range [%s,%s]", start, end); Verify.verify(start.compareTo(tokens.min()) >= 0 && end.compareTo(tokens.max()) <= 0 && start.compareTo(end) < 0, "Invalid token range [%s,%s] for partitioner range [%s,%s]", start, end, tokens.min(), tokens.max()); } Differ(JobConfiguration config,
                  DiffJob.Params params,
                  int perExecutorRateLimit,
                  DiffJob.Split split,
                  TokenHelper tokenHelper,
                  ClusterProvider sourceProvider,
                  ClusterProvider targetProvider,
                  ClusterProvider metadataProvider,
                  DiffJob.TrackerProvider trackerProvider); Map<KeyspaceTablePair, RangeStats> run(); RangeStats diffTable(final DiffContext context,
                                final BiConsumer<Throwable, BigInteger> partitionErrorReporter,
                                final BiConsumer<MismatchType, BigInteger> mismatchReporter,
                                final BiConsumer<RangeStats, BigInteger> journal); static void shutdown();  }
@Test(expected = VerifyException.class) public void rejectNullStartOfRange() { Differ.validateRange(null, BigInteger.TEN, TokenHelper.MURMUR3); }
@Test(expected = VerifyException.class) public void rejectNullEndOfRange() { Differ.validateRange(BigInteger.TEN, null, TokenHelper.MURMUR3); }
@Test(expected = VerifyException.class) public void rejectWrappingRange() { Differ.validateRange(BigInteger.TEN, BigInteger.ONE, TokenHelper.MURMUR3); }
@Test(expected = VerifyException.class) public void rejectRangeWithStartLessThanMinMurmurToken() { Differ.validateRange(TokenHelper.MURMUR3.min().subtract(BigInteger.ONE), BigInteger.TEN, TokenHelper.MURMUR3); }
@Test(expected = VerifyException.class) public void rejectRangeWithEndGreaterThanMaxMurmurToken() { Differ.validateRange(BigInteger.ONE, TokenHelper.MURMUR3.max().add(BigInteger.ONE), TokenHelper.MURMUR3); }