In Junit 5, I can mock a static method in a class from my test case, but when I 
test pipelines, the same is not mocked. The same class is referenced while 
static mocking directly from my test case and also while mocking pipelines (the 
static methods are called from @ProcessElement annotated methods i.e they will 
be called when pipeline.run() command is called).

Here is the link to my code 
testRepo/src/test/java/org/apachetest/response/BuildResponseTest.java at main ยท 
paramaanu235/testRepo<https://github.com/paramaanu235/testRepo/blob/main/src/test/java/org/apachetest/response/BuildResponseTest.java>

 also tried this approach through DI but the results were the same.

Can someone please guide me how to unit test in such case in java?

Thanks,
Apoorv

Reply via email to