### Question:
DefaultOAuthUriManager implements OAuthUriManager { public Uri makeOAuthCallbackUri(String container, String host) { String callback = config.getString(container, OAUTH_GADGET_CALLBACK_URI_PARAM); if (callback == null) { return null; } return Uri.parse(callback.replace("%host%", host)); } @Inject  DefaultOAuthUriManager(ContainerConfig config); Uri makeOAuthCallbackUri(String container, String host);  }### Answer:
@Test public void noConfigValueConfigured() throws Exception { ContainerConfig config = mockConfig(null); DefaultOAuthUriManager manager = makeManager(config); assertNull(manager.makeOAuthCallbackUri(CONTAINER, HOST)); verify(config); }
@Test public void noHostSubstitution() throws Exception { String value = "http: ContainerConfig config = mockConfig(value); DefaultOAuthUriManager manager = makeManager(config); assertEquals(value, manager.makeOAuthCallbackUri(CONTAINER, HOST).toString()); verify(config); }
@Test public void oauthUriWithHostSubstitution() throws Exception { String value = "http: ContainerConfig config = mockConfig(value); DefaultOAuthUriManager manager = makeManager(config); assertEquals("http: manager.makeOAuthCallbackUri(CONTAINER, HOST).toString()); verify(config); }