@Test public void testCreateAndSignRequest() { OAuthRequest request = scribeClient.createAndSignRequest("http: assertNotNull(request); assertTrue(request.getHeaders().containsKey("Authorization")); verify(service).signRequest(eq(accessToken), any(OAuthRequest.class)); }
OAuthRequest createAndSignRequest(final String url) { OAuthRequest request = new OAuthRequest(Verb.GET, url); request.addHeader("Authorization", String.format("Bearer %s", accessToken.getToken())); service.signRequest(accessToken, request); return request; }
ScribePersonalGenomeClient implements PersonalGenomeClient { OAuthRequest createAndSignRequest(final String url) { OAuthRequest request = new OAuthRequest(Verb.GET, url); request.addHeader("Authorization", String.format("Bearer %s", accessToken.getToken())); service.signRequest(accessToken, request); return request; } }
ScribePersonalGenomeClient implements PersonalGenomeClient { OAuthRequest createAndSignRequest(final String url) { OAuthRequest request = new OAuthRequest(Verb.GET, url); request.addHeader("Authorization", String.format("Bearer %s", accessToken.getToken())); service.signRequest(accessToken, request); return request; } ScribePersonalGenomeClient(final Token accessToken, final OAuthService service, final PersonalGenomeConverter converter); }
ScribePersonalGenomeClient implements PersonalGenomeClient { OAuthRequest createAndSignRequest(final String url) { OAuthRequest request = new OAuthRequest(Verb.GET, url); request.addHeader("Authorization", String.format("Bearer %s", accessToken.getToken())); service.signRequest(accessToken, request); return request; } ScribePersonalGenomeClient(final Token accessToken, final OAuthService service, final PersonalGenomeConverter converter); @Override User user(); @Override UserName names(final String profileId); @Override Haplogroup haplogroups(final String profileId); @Override Genotype genotypes(final String profileId, final String... locations); @Override Genotype genotypes(final String profileId, final Iterable<String> locations); @Override Genome genome(final String profileId); @Override Ancestry ancestry(final String profileId, final double threshold); @Override double neanderthalProportion(final String profileId); @Override Iterator<Relative> relatives(final String profileId); @Override List<Relative> relatives(final String profileId, final int offset, final int limit); @Override List<Risk> risks(final String profileId); @Override List<Carrier> carriers(final String profileId); @Override List<DrugResponse> drugResponses(final String profileId); @Override List<Trait> traits(final String profileId); }
ScribePersonalGenomeClient implements PersonalGenomeClient { OAuthRequest createAndSignRequest(final String url) { OAuthRequest request = new OAuthRequest(Verb.GET, url); request.addHeader("Authorization", String.format("Bearer %s", accessToken.getToken())); service.signRequest(accessToken, request); return request; } ScribePersonalGenomeClient(final Token accessToken, final OAuthService service, final PersonalGenomeConverter converter); @Override User user(); @Override UserName names(final String profileId); @Override Haplogroup haplogroups(final String profileId); @Override Genotype genotypes(final String profileId, final String... locations); @Override Genotype genotypes(final String profileId, final Iterable<String> locations); @Override Genome genome(final String profileId); @Override Ancestry ancestry(final String profileId, final double threshold); @Override double neanderthalProportion(final String profileId); @Override Iterator<Relative> relatives(final String profileId); @Override List<Relative> relatives(final String profileId, final int offset, final int limit); @Override List<Risk> risks(final String profileId); @Override List<Carrier> carriers(final String profileId); @Override List<DrugResponse> drugResponses(final String profileId); @Override List<Trait> traits(final String profileId);  }