OMElement config2 = serializer.serializeMediator(null, send1);
SendMediator send2 = (SendMediator) factory.createMediator(config2, new Properties());
assertTrue("Top level endpoint should be a address endpoint.",
send1.getEndpoint() instanceof AddressEndpoint);
AddressEndpoint ep1 = (AddressEndpoint) send1.getEndpoint();
assertTrue("Top level endpoint should be a WSDL endpoint.",
send2.getEndpoint() instanceof AddressEndpoint);
AddressEndpoint ep2 = (AddressEndpoint) send2.getEndpoint();
assertEquals("Address URI is not serialized properly",
ep1.getDefinition().getAddress(), ep2.getDefinition().getAddress());
assertEquals(
"Addressing information is not serialized properly",
ep1.getDefinition().isAddressingOn(),
ep2.getDefinition().isAddressingOn());
}