use of org.springframework.test.annotation.DirtiesContext in project atlasmap by atlasmap.
the class AtlasMapMultiNSTest method test.
@Test
@DirtiesContext
public void test() throws Exception {
result.setExpectedCount(1);
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
SourceContact c = new SourceContact();
c.setFirstName("Jackson");
producerTemplate.sendBody("direct:start", c);
MockEndpoint.assertIsSatisfied(camelContext);
Message message = result.getExchanges().get(0).getIn();
Assert.assertEquals("application/xml", message.getHeader(Exchange.CONTENT_TYPE));
String out = message.getBody(String.class);
Assert.assertNotNull(out);
Diff d = DiffBuilder.compare(Input.fromString(XML_EXPECTED).build()).withTest(Input.fromString(out).build()).ignoreWhitespace().build();
Assert.assertFalse(d.toString() + ": " + out, d.hasDifferences());
}
Aggregations