public Destination[] createDestinations(int destCount) throws JMSException {
        final String destName = getClient().getDestName();
        ArrayList<Destination> destinations = new ArrayList<>();
        if (destName.contains(DESTINATION_SEPARATOR)) {
            if (getClient().isDestComposite() && (destCount == 1)) {
                // user was explicit about which destinations to make composite
                String[] simpleNames = mapToSimpleNames(destName.split(DESTINATION_SEPARATOR));
                String joinedSimpleNames = join(simpleNames, DESTINATION_SEPARATOR);

                // use the type of the 1st destination for the Destination instance
                byte destinationType = getDestinationType(destName);
                destinations.add(createCompositeDestination(destinationType, joinedSimpleNames, 1));
            } else {
                LOG.info("User requested multiple destinations, splitting: {}", destName);
                // either composite with multiple destinations to be suffixed
                // or multiple non-composite destinations
                String[] destinationNames = destName.split(DESTINATION_SEPARATOR);
                for (String splitDestName : destinationNames) {
                    addDestinations(destinations, splitDestName, destCount);
                }
            }
        } else {
            addDestinations(destinations, destName, destCount);
        }
        return destinations.toArray(new Destination[] {});
    }
@Test
    public void testCreateDestinations_commaSeparated() throws JMSException {
        clientProperties.setDestName("queue://foo,topic://cheese");
        Destination[] destinations = jmsClient.createDestinations(1);
        assertEquals(2, destinations.length);
        assertDestinationNameType("foo", QUEUE_TYPE, asAmqDest(destinations[0]));
        assertDestinationNameType("cheese", TOPIC_TYPE, asAmqDest(destinations[1]));
    }