P next(final Aeron aeron)
    {
        final int cursor = nextCursor();
        final String endpoint = endpoints[cursor];

        final ChannelUri channelUri = ChannelUri.parse(channelTemplate);
        channelUri.put(ENDPOINT_PARAM_NAME, endpoint);
        final String channel = channelUri.toString();

        CloseHelper.quietClose(current);
        current = publicationFactory.addPublication(aeron, channel, streamId);
        return current;
    }
@Test
    void shouldUseAllPublicationsInListWhenGettingNextPublication()
    {
        publicationGroup.next(mockAeron);
        publicationGroup.next(mockAeron);
        publicationGroup.next(mockAeron);

        verify(mockAeron).addExclusivePublication("aeron:udp?endpoint=localhost:1001|term-length=64k", streamId);
        verify(mockAeron).addExclusivePublication("aeron:udp?endpoint=localhost:1002|term-length=64k", streamId);
        verify(mockAeron).addExclusivePublication("aeron:udp?endpoint=localhost:1003|term-length=64k", streamId);
    }