@Test
  public void testSamePartitionName_Primary_OnTwoMembers() {
    addIgnoredException(DuplicatePrimaryPartitionException.class);

    member1.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      FixedPartitionAttributes fpa = createFixedPartition(QUARTER_1, true, 3);
      createPartitionedRegion(REGION_NAME, singletonList(fpa), 0, 40, 9,
          newQuarterPartitionResolver());
    });

    member2.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      FixedPartitionAttributes fpa = createFixedPartition(QUARTER_2, true, 3);
      createPartitionedRegion(REGION_NAME, singletonList(fpa), 0, 40, 9,
          newQuarterPartitionResolver());
    });

    member3.invoke(() -> {
      cache.set(new CacheFactory(getDistributedSystemProperties()).create());
      FixedPartitionAttributes fpa = createFixedPartition(QUARTER_2, true, 3);

      Throwable thrown = catchThrowable(() -> {
        createPartitionedRegion(REGION_NAME, singletonList(fpa), 0, 40, 9,
            newQuarterPartitionResolver());
      });

      assertThat(thrown)
          .isInstanceOf(DuplicatePrimaryPartitionException.class)
          .hasMessageContaining("can not be defined as primary on more than one node");
    });
  }
Test validation : only one node should return primary for a particular partition name for a
specific FPR at any given point of time. DuplicatePrimaryPartitionException is thrown during
FPR creation if this condition is not met.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/fixed/FixedPartitioningDUnitTest.java