@Deployment(resources = { "com/founder/fix/fixflow/test/engine/api/task/TaskServiceNewTest.bpmn"})
public void testSaveIdentityLink(){
//创建任务候选人实体
String identityLinkId = GuidUtil.CreateGuid();
IdentityLinkEntity identityLinkEntity = new IdentityLinkEntity();
identityLinkEntity.setId(identityLinkId);
identityLinkEntity.setGroupId("groupId");
identityLinkEntity.setUserId("userId");
identityLinkEntity.setGroupType("groupType");
identityLinkEntity.setType(IdentityLinkType.candidate);
identityLinkEntity.setIncludeExclusion(IncludeExclusion.EXCLUSION);
identityLinkEntity.setTaskId("taskId");
//保存identityLinkEntity
Context.getCommandContext().getIdentityLinkManager().saveIdentityLink(identityLinkEntity);
//根据编号查询保存的identityLinkEntity
IdentityLinkEntity identityLinkEntity2 = Context.getCommandContext().getIdentityLinkManager().selectIdentifyLinkById(identityLinkId);
//验证查询出来的实体属性正确
assertEquals(identityLinkId, identityLinkEntity2.getId());
assertEquals("groupId",identityLinkEntity2.getGroupId());
assertEquals("userId", identityLinkEntity2.getUserId());
assertEquals("groupType", identityLinkEntity2.getGroupType());
assertEquals("taskId", identityLinkEntity2.getTaskId());
assertEquals(IdentityLinkType.candidate, identityLinkEntity2.getType());
assertEquals(IncludeExclusion.EXCLUSION, identityLinkEntity2.getIncludeExclusion());
}