AbstractEndpointAdapter implements EndpointAdapter { @Override public final Message handleMessage(Message request) { Message replyMessage = handleMessageInternal(request); if ((replyMessage == null || replyMessage.getPayload() == null)) { if (fallbackEndpointAdapter != null) { log.debug("Did not receive reply message - " + "delegating to fallback endpoint adapter"); replyMessage = fallbackEndpointAdapter.handleMessage(request); } else { log.debug("Did not receive reply message - no response is simulated"); } } return replyMessage; }  @Override final Message handleMessage(Message request); void setName(String name); String getName(); EndpointAdapter getFallbackEndpointAdapter(); void setFallbackEndpointAdapter(EndpointAdapter fallbackEndpointAdapter); void setTestContextFactory(TestContextFactory testContextFactory); TestContextFactory getTestContextFactory();  }
@Test public void testEndpointAdapter() { AbstractEndpointAdapter abstractEndpointAdapter = new AbstractEndpointAdapter() { @Override protected Message handleMessageInternal(Message message) { return null; } @Override public Endpoint getEndpoint() { return null; } @Override public EndpointConfiguration getEndpointConfiguration() { return null; } }; Assert.assertNull(abstractEndpointAdapter.handleMessage(new DefaultMessage("<TestMessage><text>Hi!</text></TestMessage>"))); }