I have a java object(pojo bean) which contains some fields and other java object. Is there any library in java which I can use to populate this object?
I want to pass new object to that library and it should return me object with some random data populated inside it.
Lets say if I have employee and department object. Employee has name(string), id(int) and department property. Department has id(int) and name(string) property.
I want this employee object to be populated with some sample data like "abc" for name, 32 for id, etc.
Is this possible or I need to write my own code? Any pointer will help me.
My mistake, the question was already being asked at - Fill primitive properties with random data automatically?. It has the solution.
Even if anyone knows better solution please feel free to post it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With