New issue 251 by gipszlya...@gmail.com: ClassCastException when mocking a
method with a return type of List<SomeInterface>
http://code.google.com/p/mockito/issues/detail?id=251
What steps will reproduce the problem?
1. see atached sample TestClass, try to run it as a test
2. it with fail with an Exception:
FAILED CONFIGURATION: @BeforeMethod init
java.lang.ClassCastException:
org.mockito.internal.creation.jmock.ClassImposterizer$ClassWithSuperclassToWorkAroundCglibBug$$EnhancerByMockitoWithCGLIB$$391431f1
cannot be cast to org.SimpleA
at org.SimpleA.init(SimpleA.java:26)
What is the expected output? What do you see instead?
shouldnt throw an exception
What version of the product are you using? On what operating system?
1.8.6-SNAPSHOT, mac-osx, java:1.6.0_13
Please provide any additional information below.
Attachments:
SimpleA.java 749 bytes
Yeah, its a problem with deep stubs and i swear we have somewhere in the
tracker and on our radar. Unfortunately, fixing it requires a lot of
hacking due to the jdk api.
Comment #2 on issue 251 by brice.du...@gmail.com: ClassCastException when
mocking a method with a return type of List<SomeInterface>
http://code.google.com/p/mockito/issues/detail?id=251
(No comment was entered for this change.)