public List<PartitionAssignment> assignments() {
        return assignments;
    }
@Test
    public void testTopicAssignmentReplicas() {
        List<Integer> replicasP0 = Arrays.asList(0, 1, 2);
        List<Integer> replicasP1 = Arrays.asList(1, 2, 0);
        List<PartitionAssignment> partitionAssignments = Arrays.asList(
            partitionAssignment(replicasP0),
            partitionAssignment(replicasP1)
        );
        assertEquals(partitionAssignments, new TopicAssignment(partitionAssignments).assignments());
    }