I was implementing some unit tests for our camel routes of type direct-vm (we have 2 camel contexts in our project) and I ran with this issue. I wrote a post in StackOverflow, I added information there about the possible bug that I found.
When using the adviceWith, the mockEndpoints function doesn't seem to work with direct-vm routes, an exception is being thrown. As a work around i'm using weaveByToUri and replace, but perhaps It should work with mockEndpoints too. I'm using mockEndpoints() with no parameters and __ mockEndpoints("direct-vm:*") but none of them works.