GowallaTemplate extends AbstractOAuth2ApiBinding implements Gowalla { public String getProfileId() { return getUserProfile().getId(); } GowallaTemplate(String accessToken); String getProfileId(); GowallaProfile getUserProfile(); GowallaProfile getUserProfile(String userId); String getProfileUrl(); List<Checkin> getTopCheckins(String userId);  }
@Test public void getProfileId() { mockServer.expect(requestTo("https: .andExpect(header("Authorization", "Token token=\"ACCESS_TOKEN\"")) .andRespond(withResponse("{\"username\":\"habuma\",\"pins_count\":17,\"stamps_count\":2}", responseHeaders)); assertEquals("habuma", gowalla.getProfileId()); }