I'm new to Java and needed some help. I have a utility class that has two methods where one method converts Json string to object and the other converts an object to Json string
I wanted to test these methods with junit. For this test purpose I would need an object ofcourse. Lets say a student object with a name and StudentId.
My question is that is there any way I can get this object in my Test without actually creating a separate class for the student? Since I only need this object for testing purposes.