@Test
public void generateMoreThan255() {

	StringBuilder firstName = new StringBuilder();
	for (int index = 0; index < 130; index++) {
		firstName.append("F");
	}
	
	StringBuilder lastName = new StringBuilder();
	for (int index = 0; index < 130; index++) {
		lastName.append("L");
	}
	ValueGeneratorDto generator = getGenerator();
	this.createGenerator(getDtoType(), getGeneratorType(),
			this.createConfiguration(generator.getFormDefinition(), ImmutableMap.of(
					IdentityUsernameGenerator.FIRST_NAME_FIRST, Boolean.TRUE.toString())),
			1, null);
	IdmIdentityDto identityDto = new IdmIdentityDto();
	identityDto.setFirstName(firstName.toString());
	identityDto.setLastName(lastName.toString());
	IdmIdentityDto generatedDto = valueGeneratorManager.generate(identityDto);
	
	assertEquals(identityDto.getLastName(), generatedDto.getLastName());
	assertEquals(identityDto.getFirstName(), generatedDto.getFirstName());
	
	assertNotNull(generatedDto.getUsername());
	assertEquals(255, generatedDto.getUsername().length());
}