@Test
  public void testPut_ValidateDataOnMember_MultiplePrimaries_Datastore_CacheClosed() {
    member1.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      FixedPartitionAttributes fpa1 = createFixedPartition(QUARTER_1, true, 3);
      FixedPartitionAttributes fpa2 = createFixedPartition(QUARTER_2, false, 3);
      FixedPartitionAttributes fpa3 = createFixedPartition(QUARTER_3, false, 3);
      FixedPartitionAttributes fpa4 = createFixedPartition(QUARTER_4, false, 3);
      createPartitionedRegion("Quarter", asList(fpa1, fpa2, fpa3, fpa4), 2, 40, 12,
          newQuarterPartitionResolver());
    });

    member2.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      FixedPartitionAttributes fpa1 = createFixedPartition(QUARTER_3, true, 3);
      FixedPartitionAttributes fpa2 = createFixedPartition(QUARTER_1, false, 3);
      FixedPartitionAttributes fpa3 = createFixedPartition(QUARTER_2, false, 3);
      FixedPartitionAttributes fpa4 = createFixedPartition(QUARTER_4, false, 3);
      createPartitionedRegion("Quarter", asList(fpa1, fpa2, fpa3, fpa4), 2, 40, 12,
          newQuarterPartitionResolver());
    });

    FixedPartitionAttributes fpa1 = createFixedPartition(QUARTER_2, true, 3);
    FixedPartitionAttributes fpa2 = createFixedPartition(QUARTER_4, true, 3);
    FixedPartitionAttributes fpa3 = createFixedPartition(QUARTER_1, false, 3);
    FixedPartitionAttributes fpa4 = createFixedPartition(QUARTER_3, false, 3);

    member3.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      createPartitionedRegion("Quarter", asList(fpa1, fpa2, fpa3, fpa4), 2, 40, 12,
          newQuarterPartitionResolver());
    });

    member1.invoke(() -> putThroughDataStore("Quarter"));

    member1.invoke(this::checkStartingBucketIDs);
    member2.invoke(this::checkStartingBucketIDs);
    member3.invoke(this::checkStartingBucketIDs);

    member3.invoke(() -> cache.get().close());

    Wait.pause(1000);

    member1.invoke(this::checkStartingBucketIDs);
    member2.invoke(this::checkStartingBucketIDs);

    member3.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      createPartitionedRegion("Quarter", asList(fpa1, fpa2, fpa3, fpa4), 2, 40, 12,
          newQuarterPartitionResolver());
    });

    Wait.pause(3000);

    member1.invoke(this::checkStartingBucketIDs);
    member2.invoke(this::checkStartingBucketIDs);
    member3.invoke(this::checkStartingBucketIDs);
  }
Datastore = 4 Datastores Primary Secondary Member1 = Q1(0,1,2) Q2(3,4,5),Q3(6,7,8),Q4(9,10,11)
Member2 = Q3(6,7,8) Q1(0,1,2), Q2(3,4,5),Q4(9,10,11) Member3 = Q2(3,4,5),Q4(9,10,11) Q1(0,1,2),
Q3(6,7,8)

<p>
Put happens for all buckets

<p>
Member 3 goes down, then either member1 or member2 holds primary for member4

<p>
Primary Secondary Member1 = Q1(0,1,2),Q2(3,4,5) Q3(6,7,8), Q4(9,10,11) Member2 =
Q3(6,7,8),Q4(9,10,11) Q1(0,1,2), Q2(3,4,5)

<p>
Member 3 comes again then it should be same as it was before member 3 went down

<p>
Member1 = Q1(0,1,2) Q2(3,4,5),Q3(6,7,8),Q4(9,10,11) Member2 = Q3(6,7,8) Q1(0,1,2),
Q2(3,4,5),Q4(9,10,11) Member3 = Q2(3,4,5),Q4(9,10,11) Q1(0,1,2), Q3(6,7,8)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java