Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
StackOverFlow when mocking Thread.getName(). #52
I want to report an issue I discovered recently.
While it looks like the example above was fixed in 1.12 I still get a stackoverflow for this test in 1.13
and in 1.14 and beyond I get "java.lang.IllegalArgumentException: Attempted to record expectation on unmockable method".
Is there a better way to do this? My actual code isn't going to have a direct reference to the thread instance created in the test, it will be calling Thread.currentThread().getName()