@Test
public void sendEmailInvitation() {

	mockServer.expect(requestTo(CommunicationTemplate.MESSAGING_URL+"?oauth2_access_token=ACCESS_TOKEN"))
		.andExpect(method(POST))
		.andExpect(jsonPath("body", is("I'd like to add you to my professional network on LinkedIn")))
		.andExpect(jsonPath("subject", is("I'd like to add you to my professional network on LinkedIn")))
		.andExpect(jsonPath("recipients.values", hasSize(1)))
		.andExpect(jsonPath("recipients.values[0].person._path", is("/people/email=rob@test.com")))
		.andExpect(jsonPath("recipients.values[0].person.first-name", is("Robert")))
		.andExpect(jsonPath("recipients.values[0].person.last-name", is("Smith")))
		.andExpect(jsonPath("item-content.invitation-request.connect-type", is("friend")))
		.andRespond(withSuccess("", MediaType.APPLICATION_JSON));
	linkedIn.communicationOperations().connectTo("I'd like to add you to my professional network on LinkedIn",
			"I'd like to add you to my professional network on LinkedIn", "rob@test.com", "Robert", "Smith");
}