@Test
public void generateShorterProperties() {

	String firstName = "firstName";
	String lastName = "lastName";
	
	String newFirstName = "first";
	String newLastName = "last";
	ValueGeneratorDto generator = getGenerator();
	this.createGenerator(getDtoType(), getGeneratorType(),
			this.createConfiguration(generator.getFormDefinition(),
					ImmutableMap.of(
							IdentityUsernameGenerator.FIRST_NAME_CHARACTERS_COUNT, "5",
							IdentityUsernameGenerator.LAST_NAME_CHARACTERS_COUNT, "4",
							IdentityUsernameGenerator.FIRST_NAME_FIRST, Boolean.TRUE.toString())),
			1, null);
	IdmIdentityDto identityDto = new IdmIdentityDto();
	identityDto.setFirstName(firstName);
	identityDto.setLastName(lastName);
	IdmIdentityDto generatedDto = valueGeneratorManager.generate(identityDto);
	
	assertEquals(identityDto.getLastName(), generatedDto.getLastName());
	assertEquals(identityDto.getFirstName(), generatedDto.getFirstName());
	
	assertNotNull(generatedDto.getUsername());
	assertEquals(newFirstName + newLastName, generatedDto.getUsername());
}