Mockito throws NPE when using AnyVal derived types in mocked methods
longliveenduro opened this issue · 2 comments
longliveenduro commented
Mockito throws NPE when using AnyVal derived types in mocked methods
See https://github.com/longliveenduro/mockito-anyval-bug to reproduce.
See also https://gist.github.com/kasia-kittel/3255fd5dc5f8f861f4e02bb966302c1c
ultrasecreth commented
99% sure that's because you must specify the type when using any matchers that replace a value class, check the docs here: https://github.com/mockito/mockito-scala#value-class-matchers
longliveenduro commented
Cheers that works!