@Test
  public void testFPR_Persistence3() throws InterruptedException {
    vm0.invoke(() -> {
      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q1.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q2.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);
    });

    vm1.invoke(() -> {
      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q2.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q3.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);
    });

    vm2.invoke(() -> {
      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q3.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q4.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);
    });

    vm3.invoke(() -> {
      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q4.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q1.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);
    });

    vm0.invoke(() -> putQuartersData());

    vm0.invoke(() -> validatePrimaryWithSecondaryData(Q1, Q2));
    vm1.invoke(() -> validatePrimaryWithSecondaryData(Q2, Q3));
    vm2.invoke(() -> validatePrimaryWithSecondaryData(Q3, Q4));
    vm3.invoke(() -> validatePrimaryWithSecondaryData(Q4, Q1));

    for (VM vm : asList(vm0, vm1, vm2, vm3)) {
      vm.invoke(() -> validatePrimaryBucketsForQuarters(6, 3));
    }

    for (VM vm : asList(vm0, vm1, vm2, vm3)) {
      vm.invoke(this::closeCache);
    }

    AsyncInvocation<Void> createRegionInVM3 = vm3.invokeAsync(() -> {
      RecoveryFinishedObserver observer = new RecoveryFinishedObserver(QUARTERS_REGION);
      InternalResourceManager.setResourceObserver(observer);

      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q4.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q1.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);

      await().until(observer::isRecoveryFinished);
    });

    AsyncInvocation<Void> createRegionInVM2 = vm2.invokeAsync(() -> {
      RecoveryFinishedObserver observer = new RecoveryFinishedObserver(QUARTERS_REGION);
      InternalResourceManager.setResourceObserver(observer);

      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q3.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q4.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);

      await().until(observer::isRecoveryFinished);
    });

    AsyncInvocation<Void> createRegionInVM1 = vm1.invokeAsync(() -> {
      RecoveryFinishedObserver observer = new RecoveryFinishedObserver(QUARTERS_REGION);
      InternalResourceManager.setResourceObserver(observer);

      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q2.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q3.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);

      await().until(observer::isRecoveryFinished);
    });

    AsyncInvocation<Void> createRegionInVM0 = vm0.invokeAsync(() -> {
      RecoveryFinishedObserver observer = new RecoveryFinishedObserver(QUARTERS_REGION);
      InternalResourceManager.setResourceObserver(observer);

      createCache();
      new RegionBuilder<>()
          .addFixedPartitionAttributes(createFixedPartition(Q1.toString(), true, 3))
          .addFixedPartitionAttributes(createFixedPartition(Q2.toString(), false, 3))
          .redundantCopies(1)
          .localMaxMemory(40)
          .totalNumBuckets(12)
          .partitionResolver(new QuarterFixedPartitionResolver<>())
          .persistent(true)
          .create(QUARTERS_REGION);

      await().until(observer::isRecoveryFinished);
    });

    createRegionInVM3.await();
    createRegionInVM2.await();
    createRegionInVM1.await();
    createRegionInVM0.await();

    vm3.invoke(() -> {
      validatePrimaryWithSecondaryData(Q4, Q1);
      validatePrimaryBucketsForQuarters(6, 3);
    });

    vm2.invoke(() -> {
      validatePrimaryWithSecondaryData(Q3, Q4);
      validatePrimaryBucketsForQuarters(6, 3);
    });

    vm1.invoke(() -> {
      validatePrimaryWithSecondaryData(Q2, Q3);
      validatePrimaryBucketsForQuarters(6, 3);
    });

    vm0.invoke(() -> {
      validatePrimaryWithSecondaryData(Q1, Q2);
      validatePrimaryBucketsForQuarters(6, 3);
    });
  }
Tests validate the behavior of FPR with persistence and with colocation when all members goes
down and comes up.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningWithColocationAndPersistenceDUnitTest.java