We only need this function in test. So it could be `private[rdd]`.