I have a java object (pojo bean) that contains some fields and another java object. Is there any library in java that I can use to populate this object?
I want to pass a new object to this library, and it should return me an object with some random data filled inside it.
Lets say if I have an employee and a department object. An employee has a name (string), identifier (int), and department property. A department has an id (int) property and a name (string).
I want this employee object to be populated with some sample data, such as "abc" for the name, 32 for id, etc.
Is this possible, or do I need to write my own code? Any pointer will help me.
source
share