-
Notifications
You must be signed in to change notification settings - Fork 238
MockedTypeCascade:230 NPE #353
Copy link
Copy link
Closed
Labels
Description
public class JMockitTest {
@Injectable
private Manager manager;
@Injectable
private User user;
interface Manager {
<T extends Entity> T find(Class<T> clazz);
}
interface Entity {
}
static class User implements Entity {
}
@Test
public void test() throws Exception {
new Expectations() {{
manager.find(User.class);
result = user;
}};
final Entity actual = manager.find(User.class);
assertSame(actual, user);
}
}
produces NPE in MockedTypeCascade.getGenericReturnType, version 1.28, 1.25. Is this not supported? Thank you.
Reactions are currently unavailable