@Test
public void generateMissingLastName() {

	String firstName = "firstName-" + System.currentTimeMillis();
	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);
	IdmIdentityDto generatedDto = valueGeneratorManager.generate(identityDto);
	
	assertEquals(identityDto.getLastName(), generatedDto.getLastName());
	assertEquals(identityDto.getUsername(), generatedDto.getUsername());
	assertEquals(identityDto.getFirstName(), generatedDto.getFirstName());
	
	assertNull(generatedDto.getUsername());
}