}
@Test
public final void givenExistingResourceAndExistingAssociation_whenUpdatingResourceWithTheAssociation_thanAssociationCorrectlyDone() {
final Role existingResource = getApi().create(getEntityOps().createNewEntity());
final Privilege existingAssociation = getAssociationAPI().create(getAssociationEntityOps().createNewEntity());
existingResource.setPrivileges(Sets.newHashSet(existingAssociation));
getApi().update(existingResource);
final Role updatedResource = getApi().findOne(existingResource.getId());
assertThat(updatedResource.getPrivileges(), hasItem(existingAssociation));