@Test
public void testAddRoleMappingAttribute() {

	IdmRoleDto role = helper.createRole();
	SysSystemDto system = helper.createTestResourceSystem(true);
	SysRoleSystemAttributeDto attribute = roleSystemAttributeService.addRoleMappingAttribute(system.getId(),
			role.getId(), helper.getSchemaColumnName(TestHelper.ATTRIBUTE_MAPPING_FIRSTNAME), null, IcObjectClassInfo.ACCOUNT);
	Assert.assertNotNull(attribute);
	SysRoleSystemFilter roleSystemFilter = new SysRoleSystemFilter();
	roleSystemFilter.setRoleId(role.getId());
	roleSystemFilter.setSystemId(system.getId());
	List<SysRoleSystemDto> roleSystems = roleSystemService.find(roleSystemFilter, null).getContent();
	Assert.assertEquals(1, roleSystems.size());
	SysRoleSystemDto roleSystem = roleSystems.get(0);
	SysSystemMappingDto systemMapping = roleSystemAttributeService.getSystemMapping(system.getId(),
			IcObjectClassInfo.ACCOUNT, SystemOperationType.PROVISIONING);
	Assert.assertNotNull(systemMapping);
	Assert.assertEquals(systemMapping.getId(), roleSystem.getSystemMapping());
}