### Question:
FacebookAdapter implements ApiAdapter<Facebook> { public void setConnectionValues(Facebook facebook, ConnectionValues values) { User profile = facebook.fetchObject("me", User.class, "id", "name", "link"); values.setProviderUserId(profile.getId()); values.setDisplayName(profile.getName()); values.setProfileUrl(profile.getLink()); values.setImageUrl(facebook.getBaseGraphApiUrl() + profile.getId() + "/picture"); }  boolean test(Facebook facebook); void setConnectionValues(Facebook facebook, ConnectionValues values); UserProfile fetchUserProfile(Facebook facebook); void updateStatus(Facebook facebook, String message);  }### Answer:
@Test public void setConnectionValues() throws Exception { User user = new User("12345678", "Craig Walls", "Craig", "Walls", null, null); Field linkField = user.getClass().getDeclaredField("link"); linkField.setAccessible(true); linkField.set(user, "https: Mockito.when(facebook.fetchObject("me", User.class, "id", "name", "link")).thenReturn(user); Mockito.when(facebook.getBaseGraphApiUrl()).thenReturn(GRAPH_API_URL); TestConnectionValues connectionValues = new TestConnectionValues(); apiAdapter.setConnectionValues(facebook, connectionValues); assertEquals("Craig Walls", connectionValues.getDisplayName()); assertEquals(GRAPH_API_URL + "12345678/picture", connectionValues.getImageUrl()); assertEquals("https: assertEquals("12345678", connectionValues.getProviderUserId()); }