public CoAPComponent() {
    }
@Test
    void testCoAPComponent() throws Exception {
        CoapClient client = createClient("/TestResource");
        CoapResponse response = client.post("Camel", MediaTypeRegistry.TEXT_PLAIN);
        assertEquals("Hello Camel", response.getResponseText());

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(1);
        mock.expectedBodiesReceived("Hello Camel CoAP");
        mock.expectedHeaderReceived(CoAPConstants.CONTENT_TYPE,
                MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
        mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
        sender.sendBody("Camel CoAP");
        MockEndpoint.assertIsSatisfied(context);
    }