Search in sources :

Example 1 with ProxyInstantiationException

use of org.apache.camel.ProxyInstantiationException in project camel by apache.

the class ProxyInstantiationExceptionTest method testProxyException.

public void testProxyException() {
    Endpoint endpoint = context.getEndpoint("mock:foo");
    ProxyInstantiationException e = new ProxyInstantiationException(CamelContext.class, endpoint, new IllegalArgumentException("Damn"));
    assertNotNull(e);
    assertNotNull(e.getMessage());
    assertSame(endpoint, e.getEndpoint());
    assertEquals(CamelContext.class, e.getType());
    assertNotNull(e.getCause());
    assertEquals("Damn", e.getCause().getMessage());
}
Also used : Endpoint(org.apache.camel.Endpoint) ProxyInstantiationException(org.apache.camel.ProxyInstantiationException)

Aggregations

Endpoint (org.apache.camel.Endpoint)1 ProxyInstantiationException (org.apache.camel.ProxyInstantiationException)1