Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

How to add dummy data to your java object

When you are unit testing, it is sometimes necessary to supplement an object with dummy data. Unfortunately, to fill a large object manually, it crawls a lot of time and work. Fortunately, there is a tool that saves us the time and work!

At, you can find a java library that fills an object with dummy data by typing one line of code.

If you use Maven, you can add the following dependency:


In this example, we want to add dummy data for an object User.

Now, to fill this object, type the following code:

It’s easy as that! Enjoy! 😀

1 comment for “How to add dummy data to your java object

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: