public static Address generateAddress() {
return generateAddress(RandomUtils.nextBoolean(), RandomUtils.nextBoolean());
}
public static Address generateAddress(boolean female, boolean german) {
Address address = new Address();
address.setFirstName(female ? randomString(FEMALE_FIRST_NAMES) : randomString(MALE_FIRST_NAMES));
if (german) {
address.setLastName(randomString(GERMAN_LAST_NAMES));
address.setCountry(Locale.GERMANY);
} else {
address.setLastName(randomString(ENGLISH_LAST_NAMES));
address.setCountry(RandomUtils.nextBoolean() ? Locale.US : Locale.UK);
}
Calendar calendar = Calendar.getInstance();
calendar.set(1920, 0, 1);
calendar.add(Calendar.DAY_OF_YEAR, RandomUtils.nextInt(70 * 365));
address.setDayOfBirth(calendar.getTime());
return address;
}