writing resample indexes unit tests