How to test custom types?