Source code misaligned when partial mocking private methods using JMockit
posted 2 years ago
I have a class that I am partially mocking using NonStrictExpectations
The problem is that when I use Deencapsulation.invoke() to mock a private method it messes up the source code of the CampaignSelector class and hence when I debug into the getMessageFromCampaign() method the source code is misaligned in Eclipse. I understand that JMockit redefines classes but this only happens when private methods are mocked and not public. Any way to get around this problem?