// Assert that deserialized event has service and that the service is the
// same instance
assertNotNull(deserialized.getSession().getFlowConstruct());
Service service = (Service) event.getSession().getFlowConstruct();
Service deserializedService = (Service) deserialized.getSession().getFlowConstruct();
// Unable to test services for equality because of need for equals() everywhere. See MULE-3720
// assertEquals(event.getSession().getService(), deserialized.getSession().getService());
assertEquals(service.getName(), deserializedService.getName());
assertEquals(service.getInitialState(), deserializedService.getInitialState());
assertEquals(service.getExceptionListener().getClass(), deserializedService.getExceptionListener().getClass());
assertEquals(service.getComponent().getClass(), deserializedService.getComponent().getClass());
// Assert that deserialized event has endpoint and that the endpoint is the
// same instance
assertNotNull(deserialized.getEndpoint());
// Unable to test endpoint for equality because of need for equals() everywhere. See MULE-3720