protected void checkRepository(IndexRepositoryImpl repo0, int... bucketIds) {
    IndexWriter writer0 = repo0.getWriter();
    RegionDirectory dir0 = (RegionDirectory) writer0.getDirectory();
    boolean result = false;
    for (int bucketId : bucketIds) {
      BucketTargetingMap bucketTargetingMap =
          new BucketTargetingMap(fileAndChunkBuckets.get(bucketId), bucketId);
      result |= bucketTargetingMap.equals(dir0.getFileSystem().getFileAndChunkRegion());
    }

    assertTrue(result);
    assertEquals(serializer, repo0.getSerializer());
  }
Test that we get the expected exception when a user bucket is not indexed yet
geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java