setupGadgetAdminMock(true);
Map<String, String> options = new HashMap<String, String>();
options.put("OAUTH_SERVICE_NAME", "example");
options.put("OAUTH_SCOPE", "scope1 scope2");
request.setAuthType(AuthType.OAUTH2);
request.setOAuth2Arguments(new OAuth2Arguments(AuthType.OAUTH2, options));
options = new HashMap<String, String>();
options.put("OAUTH_SERVICE_NAME", "example");
options.put("OAUTH_SCOPE", "scope1 scope2");
HttpRequest req = new HttpRequest(Uri.parse(url))
.setAuthType(AuthType.OAUTH2)
.setGadget(Uri.parse(""))
.setContainer("default")
.setOAuth2Arguments(new OAuth2Arguments(AuthType.OAUTH2, options));
HttpResponse resp = new HttpResponseBuilder()
.setResponseString("Hello")
.create();
expect(pipeline.execute(req)).andReturn(resp);