Program: 61341
Project: 61341
Buggy source:
@Test public void create(){
  UserTO userTO=getSampleTO("String_Node_Str");
  AttributeTO attrWithInvalidSchemaTO=new AttributeTO();
  attrWithInvalidSchemaTO.setSchema("String_Node_Str");
  attrWithInvalidSchemaTO.addValue("String_Node_Str");
  userTO.addAttribute(attrWithInvalidSchemaTO);
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRole(8L);
  userTO.addMembership(membershipTO);
  UserTO newUserTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",userTO,UserTO.class);
  assertNotNull(newUserTO);
  assertFalse(newUserTO.getAttributes().contains(attrWithInvalidSchemaTO));
  WorkflowActionsTO workflowActions=restTemplate.getForObject(BASE_URL + "String_Node_Str",WorkflowActionsTO.class,newUserTO.getId());
  assertTrue(workflowActions.getActions().equals(Collections.singleton("String_Node_Str")));
  newUserTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",newUserTO,UserTO.class);
  assertEquals("String_Node_Str",restTemplate.getForObject(BASE_URL + "String_Node_Str" + newUserTO.getId(),String.class));
  userTO=getSampleTO("String_Node_Str");
  AttributeTO userIdTO=new AttributeTO();
  userIdTO.setSchema("String_Node_Str");
  userIdTO.addValue("String_Node_Str");
  userTO.addAttribute(userIdTO);
  SyncopeClientException syncopeClientException=null;
  try {
    restTemplate.postForObject(BASE_URL + "String_Node_Str",userTO,UserTO.class);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    syncopeClientException=e.getException(SyncopeClientExceptionType.InvalidUniques);
  }
  assertNotNull(syncopeClientException);
  assertTrue(syncopeClientException.getElements().contains("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void create(){
  UserTO userTO=getSampleTO("String_Node_Str");
  AttributeTO attrWithInvalidSchemaTO=new AttributeTO();
  attrWithInvalidSchemaTO.setSchema("String_Node_Str");
  attrWithInvalidSchemaTO.addValue("String_Node_Str");
  userTO.addAttribute(attrWithInvalidSchemaTO);
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRole(8L);
  userTO.addMembership(membershipTO);
  UserTO newUserTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",userTO,UserTO.class);
  assertNotNull(newUserTO);
  assertFalse(newUserTO.getAttributes().contains(attrWithInvalidSchemaTO));
  WorkflowActionsTO workflowActions=restTemplate.getForObject(BASE_URL + "String_Node_Str",WorkflowActionsTO.class,newUserTO.getId());
  assertTrue(workflowActions.getActions().equals(Collections.singleton(Constants.ACTION_ACTIVATE)));
  newUserTO=restTemplate.postForObject(BASE_URL + "String_Node_Str",newUserTO,UserTO.class);
  assertEquals("String_Node_Str",restTemplate.getForObject(BASE_URL + "String_Node_Str" + newUserTO.getId(),String.class));
  userTO=getSampleTO("String_Node_Str");
  AttributeTO userIdTO=new AttributeTO();
  userIdTO.setSchema("String_Node_Str");
  userIdTO.addValue("String_Node_Str");
  userTO.addAttribute(userIdTO);
  SyncopeClientException syncopeClientException=null;
  try {
    restTemplate.postForObject(BASE_URL + "String_Node_Str",userTO,UserTO.class);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    syncopeClientException=e.getException(SyncopeClientExceptionType.InvalidUniques);
  }
  assertNotNull(syncopeClientException);
  assertTrue(syncopeClientException.getElements().contains("String_Node_Str"));
}