JcaModel jcaModel = resourceAdapter.getJcaModel("jca");
MuleActivationSpec activationSpec = new MuleActivationSpec();
activationSpec.setEndpoint("test://testEndpoint");
InboundEndpoint endpoint = resourceAdapter.createMessageInflowEndpoint(activationSpec);
Service service = resourceAdapter.createJcaService(endpointFactory, jcaModel, endpoint);
// Check service
assertNotNull(service);
assertEquals("JcaService#" + endpointFactory.hashCode(), service.getName());
assertNotNull(service);
assertTrue(service instanceof JcaService);
assertNotNull(service.getComponent());
assertTrue(service.getComponent() instanceof JcaComponent);
assertNotNull(((JcaComponent) service.getComponent()).workManager);
testJcaService(service);
testEndpoint(service);
// Check endpoint
ImmutableEndpoint endpoint2 = ((ServiceCompositeMessageSource) service.getMessageSource()).getEndpoints().get(0);
assertEquals(endpoint, endpoint2);
// Check service implementation
assertEquals(endpointFactory, ((JcaComponent) service.getComponent()).messageEndpointFactory);
}