Examples of mapToEvent()


Examples of org.talend.esb.sam.agent.eventproducer.MessageToEventMapper.mapToEvent()

    @Test
    public void testMaxContentLength() throws IOException, EndpointException {
        Message message = getTestMessage();
        MessageToEventMapper mapper = new MessageToEventMapper();
        mapper.setMaxContentLength(MAXCONTENTLENGTH);
        Event event = mapper.mapToEvent(message);
        //System.out.println(event.getContent());
        Assert.assertEquals(MAXCONTENTLENGTH, event.getContent().length());
        Assert.assertEquals("<cut><![CDATA[" + TESTCONTENT.substring(0, MAXCONTENTLENGTH - 23) + "]]></cut>", event.getContent());
        Assert.assertTrue(event.isContentCut());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.