getApi().create(newResource2);
}
@Test
public final void whenScenarioOfWorkingWithAssociations_thenTheChangesAreCorrectlyPersisted() {
final Privilege existingAssociation = getAssociationService().create(new Privilege(randomAlphabetic(6)));
final Role resource1 = new Role(randomAlphabetic(6), Sets.newHashSet(existingAssociation));
final Role resource1ViewOfServerBefore = getApi().create(resource1);
assertThat(resource1ViewOfServerBefore.getPrivileges(), hasItem(existingAssociation));