@Test
public void testWithoutUsername() {

	String emailSuffix = "@example.tld";
	IdmIdentityDto identityDto = new IdmIdentityDto();
	identityDto.setFirstName(this.getHelper().createName());
	identityDto.setLastName(this.getHelper().createName());
	ValueGeneratorDto generator = getGenerator();
	this.createGenerator(getDtoType(), getGeneratorType(),
			this.createConfiguration(generator.getFormDefinition(), ImmutableMap.of(
					IdentityEmailGenerator.EMAIL_SUFFIX, emailSuffix,
					IdentityEmailGenerator.GENERATE_FROM_USERNAME, Boolean.TRUE.toString())), 1, null);
	IdmIdentityDto generatedDto = valueGeneratorManager.generate(identityDto);
	assertNull(generatedDto.getEmail());
}