Ive noticed that objects imported by Spring DM are not always equal to the raw target service. Why is that?
To deal with dynamics, Spring DM creates proxies around the imported services. The proxies are classes (generated at runtime), different from the target but able to intercept the calls made to it. Since a proxy is different then its target, comparing objects against it can yield different results then when the comparison is done against the target. In most scenarios this is not a problem but there might be corner cases where this contract matters. Since 1.1, Spring DM importer proxies implement InfrastructureProxy interface (from Spring framework) which allow access to the raw target.