I have a simple hibernate mapping file that makes use of a custom value type for one of the fields. The custom value type contains some reasonably complex business logic. I would like to be able to unit test my object persistence without the custom value type's logic. Is there any way to mock out the custom value type?
I have seen a similar question to this where the accepted solution was to enhance the custom value type to accept an injected 'strategy'. I don't particularly like the idea of enhancing my class just to cater for unit testing, so I would prefer to mock if possible.
Thanks to anyone for any help!!