### Question:
RequestExecutorFactoryImpl implements RequestExecutorFactory { @Override public RequestExecutor createExecutor(String url, UsernamePasswordCredentials credentials) { return new RequestExecutor(url, new HttpClientFactoryImpl(), settings).setCredentials(credentials); } RequestExecutorFactoryImpl(Settings settings); @Override RequestExecutor createExecutor(String url, UsernamePasswordCredentials credentials); @Override RequestExecutor createExecutor(HttpPost request, UsernamePasswordCredentials credentials);  }### Answer:
@Test public void createExecutorWithUrlReturnsRequestExecutor() { assertEquals(RequestExecutor.class, factory.createExecutor("http: }
@Test public void createExecutorWithRequestReturnsRequestExecutor() throws URISyntaxException { HttpPost post = mock(HttpPost.class); URI uri = new URI("http: when(post.getURI()).thenReturn(uri); assertEquals(RequestExecutor.class, factory.createExecutor(post, mock(UsernamePasswordCredentials.class)) .getClass()); }