I was wondering if it possible to save instance of an object during runtime and use that instance latter on for testing.
My case is that my application makes request to server, parses json response to objects and latter on I want to use some of these instances for junit testing.
I don't want to serialize them.
For example I have Set containing strings "1","2","3". At given point i want to save an instance of it. Program goes, expects all the fields of the object, makes new instance, initialize it with current values and stores it as MySet or something like this and it contains the given strings.
I hope I was clear enough.