String id2 = getProperty("sample.id2");
if (getEnvironment().isSmartCloud()) {
displayName2 = getProperty("smartcloud.displayName2");
id2 = getProperty("smartcloud.id2");
}
Invite invite = createInvite(community, id2);
addSnippetParam("CommunityService.communityUuid", community.getCommunityUuid());
addSnippetParam("CommunityService.inviteeUuid", invite.getInviteeUuid());
JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
JsonJavaObject json = previewPage.getJson();
Assert.assertNull("Unexpected error detected on page", json.getString("code"));
String inviteUuid = community.getCommunityUuid() + "-" + invite.getInviteeUuid();
Assert.assertEquals(inviteUuid, json.getString("inviteUuid"));
}