I am new to unit testing and started writing unit test for one of our legacy project, the issue with the project is we have long methods using local variables and object for manipulation. I have come across powermockito which i hope should help me in testing the state of local variables.
The issue what i am facing currently is there is a method which takes input as obj1 and a string param uuid within the method we are assigning the value of uuid to locally created object using setters; prior to converting the obj1 to newObj. I need to verify the newly created object value as part of code coverage and testing.
Below are my code snippets, let me know where i am going wrong in my Unit test case:
public Obj1 processing(Obj1 obj1, String uuid) {Test Snippet :
@Test public void processingTest() throws Exception {