Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8B31A200BBF for ; Mon, 14 Nov 2016 12:13:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 89B39160B06; Mon, 14 Nov 2016 11:13:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 04BA3160B05 for ; Mon, 14 Nov 2016 12:13:13 +0100 (CET) Received: (qmail 52963 invoked by uid 500); 14 Nov 2016 11:13:13 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Delivered-To: moderator for dev@camel.apache.org Received: (qmail 43503 invoked by uid 99); 14 Nov 2016 11:10:49 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.486 X-Spam-Level: *** X-Spam-Status: No, score=3.486 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Date: Mon, 14 Nov 2016 04:10:39 -0700 (MST) From: idioma To: dev@camel.apache.org Message-ID: <1479121839963-5790108.post@n5.nabble.com> In-Reply-To: <1479117675670-5790106.post@n5.nabble.com> References: <1478884640520-5790064.post@n5.nabble.com> <1479117675670-5790106.post@n5.nabble.com> Subject: Re: How to get hold of the content of log:message MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Mon, 14 Nov 2016 11:13:14 -0000 So, I am not sure I am heading towards the right direction, but this is what I have come up with the following: @Test public void myTest() throws Exception { //Custom component has been instantiated outside the individual test String headerValue= MyComponent.VALUE; EmailAddress recipients = new EmailAddress("recipient@example.com"); template.sendBodyAndHeader("activemq:topic:inbox", recipients.toString(), headerValue); resultEndpoint.assertIsSatisfied(); resultEndpoint.expectedBodiesReceived(recipients.toString()); resultEndpoint.expectedHeaderReceived("expected value from header", headerValue); resultEndpoint.expectedMessageCount(1); } The EmailAddress value is a constant in my Component. I am instantiating that component to get the value of that constant. Is it correct the way I am actually testing it on the mock endpoint? Thank you for your help, Ilaria -- View this message in context: http://camel.465427.n5.nabble.com/How-to-get-hold-of-the-content-of-log-message-tp5790064p5790108.html Sent from the Camel Development mailing list archive at Nabble.com.