XMLStreamReader reader = xif.createXMLStreamReader(new StringReader(testReplaceBrokerConnection));
reader.next();
ReplaceBrokerConnection replaceBrokerConnection = (ReplaceBrokerConnection)der.decode(reader);
Assert.assertEquals(replaceBrokerConnection.getRemovedBroker().getReference().getEndpointAddress().getAddress().toString(),
testUrl);
Neighbors neighbors = replaceBrokerConnection.getNeighbors();
Assert.assertEquals(neighbors.getBrokerSequence().get(0)
.getBrokerConsumerReference().getReference().getEndpointAddress().getAddress().toString(),
testUrl1);
Assert.assertEquals(neighbors.getBrokerSequence().get(0)
.getBrokerProducerReference().getReference().getEndpointAddress().getAddress().toString(),
testUrl2);
XMLOutputFactory xof = XMLOutputFactory.newInstance();
StringWriter testWriter = new StringWriter();