What if you have an object without ID. How do you know if that object already exists in the database?
When you test a DAO class. It is possible you insert or update test data in your database. Ofcourse we don’t want that. There is a possibility to rollback the transaction when your test is completed. We use EasyMock to do so.
Each country has its own phone number format. But what if you want a universal layout for all types of phone numbers? You can use Libphonenumber. With Libphonenumber, you can change phone layouts, create your own layouts, cast layouts and many more!