return Guice.createInjector(new BindNameToContext("test"), new BindProviderMetadataContextAndCredentials(md,
ofInstance(new Credentials("user", "pass"))), new BindApiContextWithWildcardExtendsExplicitAndRawType(
HttpApiMetadata.class.cast(md.getApiMetadata())),
// stuff needed for ApiContextImpl
new MockModule(), new AbstractModule() {
@Override
protected void configure() {
bind(Utils.class).toInstance(createMock(Utils.class));
bind(IntegrationTestClient.class).toInstance(createMock(IntegrationTestClient.class));