// Path: src/main/java/org/springframework/social/salesforce/api/SalesforceProfile.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class SalesforceProfile implements Serializable {
//     protected String id;
// 
//     protected String email;
// 
//     protected String firstName;
// 
//     protected String lastName;
// 
//     protected Photo photo;
//     
//     protected String name;
// 
// 
//     /*public SalesforceProfile(String id, String firstName, String lastName, String email) {
//         this.id = id;
//         this.firstName = firstName;
//         this.lastName = lastName;
//         this.email = email;
//     }*/
// 
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public Photo getPhoto() {
//         return this.photo;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public String getUsername() {
//         return this.id;
//     }
// }
// 
// Path: src/main/java/org/springframework/social/salesforce/api/Status.java
// public class Status {
// 
//     private String text;
// 
//     private List<Map<String, String>> segments;
// 
// 
//     public Status(String text) {
//         this.text = text;
//     }
// 
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// 
//     public List<Map<String, String>> getSegments() {
//         return segments;
//     }
// 
//     public void setSegments(List<Map<String, String>> segments) {
//         this.segments = segments;
//     }
// 
//     @Override
//     public String toString() {
//         return "Status{" +
//                 "text='" + text + '\'' +
//                 ", segments=" + segments +
//                 '}';
//     }
// 
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import org.springframework.social.salesforce.api.SalesforceProfile;
import org.springframework.social.salesforce.api.Status;
/**
 * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.salesforce.api.impl;




/**
 * @author Umut Utkan
 * @author Jared Ottley
 * @author Alexandru Leahu
 */
public class ChatterTemplateTest extends AbstractSalesforceTest {

    @Test
    public void getProfile() {
        mockServer.expect(requestTo("https://na7.salesforce.com/services/data/" + salesforce.apiOperations().getVersion() + "/chatter/users/me"))
                .andExpect(method(GET))
                .andRespond(withStatus(HttpStatus.OK).body(loadResource("profile.json")).headers(responseHeaders));
// Path: src/main/java/org/springframework/social/salesforce/api/SalesforceProfile.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class SalesforceProfile implements Serializable {
//     protected String id;
// 
//     protected String email;
// 
//     protected String firstName;
// 
//     protected String lastName;
// 
//     protected Photo photo;
//     
//     protected String name;
// 
// 
//     /*public SalesforceProfile(String id, String firstName, String lastName, String email) {
//         this.id = id;
//         this.firstName = firstName;
//         this.lastName = lastName;
//         this.email = email;
//     }*/
// 
// 
//     public String getId() {
//         return id;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public Photo getPhoto() {
//         return this.photo;
//     }
// 
//     public String getName() {
//         return this.name;
//     }
// 
//     public String getUsername() {
//         return this.id;
//     }
// }
// 
// Path: src/main/java/org/springframework/social/salesforce/api/Status.java
// public class Status {
// 
//     private String text;
// 
//     private List<Map<String, String>> segments;
// 
// 
//     public Status(String text) {
//         this.text = text;
//     }
// 
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// 
//     public List<Map<String, String>> getSegments() {
//         return segments;
//     }
// 
//     public void setSegments(List<Map<String, String>> segments) {
//         this.segments = segments;
//     }
// 
//     @Override
//     public String toString() {
//         return "Status{" +
//                 "text='" + text + '\'' +
//                 ", segments=" + segments +
//                 '}';
//     }
// 
// }


// Path: src/test/java/org/springframework/social/salesforce/api/impl/ChatterTemplateTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import org.springframework.social.salesforce.api.SalesforceProfile;
import org.springframework.social.salesforce.api.Status;

/**
 * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.salesforce.api.impl;




/**
 * @author Umut Utkan
 * @author Jared Ottley
 * @author Alexandru Leahu
 */
public class ChatterTemplateTest extends AbstractSalesforceTest {

    @Test
    public void getProfile() {
        mockServer.expect(requestTo("https://na7.salesforce.com/services/data/" + salesforce.apiOperations().getVersion() + "/chatter/users/me"))
                .andExpect(method(GET))
                .andRespond(withStatus(HttpStatus.OK).body(loadResource("profile.json")).headers(responseHeaders));
        SalesforceProfile profile = salesforce.chatterOperations().getUserProfile();