List of usage examples for org.springframework.social.facebook.api Reference Reference
public Reference(String id)
From source file:com.seajas.search.codex.service.social.SocialProfileServiceTest.java
@Test public void testSearchFacebookProfile() throws Exception { Reference ref1 = new Reference("id"); Reference ref2 = new Reference("id2"); FacebookProfile fbp1 = new FacebookProfile("id", "username", "name", "first", "last", "gender", Locale.GERMAN);//from w w w .jav a 2 s . co m FacebookProfile fbp2 = new FacebookProfile("id2", "username", "name", "first", "last", "gender", Locale.GERMAN); when(socialFacadeMock.searchFacebookProfiles("testPerson")).thenReturn(Lists.newArrayList(ref1, ref2)); when(socialFacadeMock.getFacebookProfiles(Lists.newArrayList("id", "id2"))) .thenReturn(Lists.newArrayList(fbp1, fbp2)); List<SocialProfileDto> dtos = socialProfileService.searchFacebookProfiles("testPerson", false); List profiles = Lists.newArrayList(SocialProfileDto.translate(fbp1), SocialProfileDto.translate(fbp2)); Assert.assertEquals(profiles, dtos); verify(mediaServiceMock, times(2)).storeUrl(anyString(), (String) isNull(), eq("image")); }