cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Mocking the MaturityHelper class

Leon_Dietz
4-Participant

Mocking the MaturityHelper class

Hello PTC-Community,

While writing JUnit Tests for my Project I found an error while trying to mock the wt.maturity.MaturityHelper class.

org.mockito.exceptions.base.MockitoException: Cannot instrument class wt.maturity.MaturityHelper because it or one of its supertypes could not be initialized

I am using mockito 5.2.0 and JUnit 5.10.0, I also activated mockito-inline as well which should enable supertypes to be mocked, but I can't seem to figure out how to do it.
Any Ideas would help, thanks in advance.

1 REPLY 1

Hi @Leon_Dietz 

Thank you for your post. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,


Catalina
PTC Community Moderator
PTC
Announcements

Top Tags