How to check that compareTo method will be invoked with this argument new ComparableVersion("1"))
verify(comparableVersion).compareTo(any(ComparableVersion.class));
Now I use any - this is not enough.
If you implement a proper equals method in your class, you can use the eq matcher. It will not verify your constructor, but it will verify against an object that has been initialized to a known state.
equals method in your class, you don't need the eq matcher at all. Just pass the value that you want to compare it to directly, for example verify(comparableVersion).compareTo(new ComparableVersion("1")); - this will use your equals to compare the actual value to new ComparableVersions("1").eq is actually not needed in this case at all.