python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Mocking private method with PowerMockito only works starting with second method call
I'm trying to mock the function 'privateMethod' to return "New value" instead of "Original value". The purpose of the function 'callPrivateMethod' is just to call and test the priv...
Christian C
Votes: 0
Answers: 1
What is the way around this error "java.lang.RuntimeException: PowerMock internal error: Should never throw exception at this level"
java.lang.RuntimeException: PowerMock internal error: Should never throw exception at this level
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44Method...
Shadrach Adamu
Votes: 0
Answers: 1
Mockito spy on class variable
I have a weird scenario where I am creating an empty List as a class variable, then I have a scheduler that updates that list. In my tests, I want to be able to see whether or not that List was update...
N.A
Votes: 0
Answers: 0
Mocking a service that utilizes a static initializer
Given the following classes, I would like to test the first one. Where I'm running into trouble is that because these are used in AWS Lambda, services are architected a certain way for performance rea...

Matt
Votes: 0
Answers: 0