### Question:
AbstractAdapter implements Adapter<C> { public final String createAPIURL(String api, C config) { return createAPIURL(api, config, (String) null); } protected  AbstractAdapter(); AdapterCanceledByUserException asAdapterCanceledByUserException(TraceIdProvider provider); AdapterException asAdapterException(String message, TraceIdProvider provider); AdapterException asAdapterException(String message, Throwable t, TraceIdProvider provider); @Override final AdapterLogId getAdapterLogId(TraceIdProvider traceIdProvider); @Override final String start(C config, AdapterMetaDataCallback callback); @Override final boolean stop(C config, AdapterMetaDataCallback callback); final String createAPIURL(String api, C config); final String createAPIURL(String api, A adapter); final String createAPIURL(String api, C config, String otherBaseURL); final String createAPIURL(String api, C config, Map<String, String> map); final String createAPIURL(String api, C config, String otherBaseURL, Map<String, String> map);  }### Answer:
@Test public void get_api_for_website_slash_create_returns_full_url1() { TestAdapterConfigInterface config = mock(TestAdapterConfigInterface.class); when(config.getProductBaseURL()).thenReturn("https: String url = adapterToTest.createAPIURL("website/create", config); assertEquals("https: }
@Test public void get_api_for_slash_website_slash_create_returns_full_url_without_double_slashes1() { TestAdapterConfigInterface config = mock(TestAdapterConfigInterface.class); when(config.getProductBaseURL()).thenReturn("https: String url = adapterToTest.createAPIURL("/website/create", config); assertEquals("https: }
@Test public void get_api_for_website_slash_create_returns_full_url() { adapterToTest.setApiPrefix("api/1.0"); TestAdapterConfigInterface config = mock(TestAdapterConfigInterface.class); when(config.getProductBaseURL()).thenReturn("https: String url = adapterToTest.createAPIURL("website/create", config); assertEquals("https: }
@Test public void get_api_for_slash_website_slash_create_returns_full_url_without_double_slashes() { adapterToTest.setApiPrefix("api/1.0"); TestAdapterConfigInterface config = mock(TestAdapterConfigInterface.class); when(config.getProductBaseURL()).thenReturn("https: String url = adapterToTest.createAPIURL("/website/create", config); assertEquals("https: }
@Test public void api_prefix_with_start_and_end_base_has_also_end_api_has_start_and_end() { adapterToTest.setApiPrefix("/api/1.0/"); TestAdapterConfigInterface config = mock(TestAdapterConfigInterface.class); when(config.getProductBaseURL()).thenReturn("https: String url = adapterToTest.createAPIURL("/website/create/", config); assertEquals("https: }