@Override
    public String convertDestination(ProtocolConverter converter, Destination d) {
        if (d == null) {
            return null;
        }
        ActiveMQDestination activeMQDestination = (ActiveMQDestination)d;
        String physicalName = activeMQDestination.getPhysicalName();

        String rc = converter.getCreatedTempDestinationName(activeMQDestination);
        if( rc!=null ) {
            return rc;
        }

        StringBuilder buffer = new StringBuilder();
        if (activeMQDestination.isQueue()) {
            if (activeMQDestination.isTemporary()) {
                buffer.append("/remote-temp-queue/");
            } else {
                buffer.append("/queue/");
            }
        } else {
            if (activeMQDestination.isTemporary()) {
                buffer.append("/remote-temp-topic/");
            } else {
                buffer.append("/topic/");
            }
        }
        buffer.append(physicalName);
        return buffer.toString();
    }
@Test(timeout = 10000)
    public void testConvertCompositeMixture() throws Exception {
        String destinationA = "destinationA";
        String destinationB = "destinationB";
        String destinationC = "destinationC";
        String destinationD = "destinationD";

        String composite = "/queue/" + destinationA + ",/topic/" + destinationB +
                           ",/temp-queue/" + destinationC + ",/temp-topic/" + destinationD;

        ActiveMQDestination destination = translator.convertDestination(converter, composite, false);

        assertEquals(ActiveMQDestination.QUEUE_TYPE, destination.getDestinationType());
        assertTrue(destination.isComposite());
        ActiveMQDestination[] composites = destination.getCompositeDestinations();
        assertEquals(4, composites.length);

        Arrays.sort(composites);

        boolean foundQueue = false;
        boolean foundTopic = false;
        boolean foundTempTopic = false;
        boolean foundTempQueue = false;

        for (ActiveMQDestination dest : composites) {
            if (dest.getDestinationType() == ActiveMQDestination.QUEUE_TYPE) {
                foundQueue = true;
            } else if (dest.getDestinationType() == ActiveMQDestination.TOPIC_TYPE) {
                foundTopic = true;
            } else if (dest.getDestinationType() == ActiveMQDestination.TEMP_TOPIC_TYPE) {
                foundTempTopic = true;
            } else if (dest.getDestinationType() == ActiveMQDestination.TEMP_QUEUE_TYPE) {
                foundTempQueue = true;
            }
        }

        assertTrue(foundQueue);
        assertTrue(foundTopic);
        assertTrue(foundTempTopic);
        assertTrue(foundTempQueue);
    }