@Test
    public void testNonPositiveReplicationFactor() {
        MockRandom random = new MockRandom();
        StripedReplicaPlacer placer = new StripedReplicaPlacer(random);
        assertEquals("Invalid replication factor 0: the replication factor must be positive.",
                assertThrows(InvalidReplicationFactorException.class,
                        () -> place(placer, 0, 1, (short) 0, Arrays.asList(
                                new UsableBroker(11, Optional.of("1"), false),
                                new UsableBroker(10, Optional.of("1"), false)))).getMessage());
    }
Test that we will place on the fenced replica if we need to.
metadata/src/test/java/org/apache/kafka/metadata/placement/StripedReplicaPlacerTest.java