assertNotNull(childRole);
// User with child role, created by admin
UserTO role1Admin = UserTestITCase.getSampleTO("syncope48admin@apache.org");
role1Admin.setPassword("password");
MembershipTO membershipTO = new MembershipTO();
membershipTO.setRoleId(childRole.getId());
role1Admin.addMembership(membershipTO);
role1Admin = restTemplate.postForObject(BASE_URL + "user/create", role1Admin, UserTO.class);
assertNotNull(role1Admin);
super.setupRestTemplate(role1Admin.getUsername(), "password");
// User with role 1, created by user with child role created above
UserTO role1User = UserTestITCase.getSampleTO("syncope48user@apache.org");
membershipTO = new MembershipTO();
membershipTO.setRoleId(1L);
role1User.addMembership(membershipTO);
role1User = restTemplate.postForObject(BASE_URL + "user/create", role1User, UserTO.class);
assertNotNull(role1User);