// Path: src/main/java/com/cisco/cta/taxii/adapter/httpclient/HttpClientFactory.java
// public class HttpClientFactory {
// 
//     private ProxySettings proxySettings;
// 
//     public HttpClientFactory(ProxySettings proxySettings) {
//         this.proxySettings = proxySettings;
//     }
// 
//     public HttpClient create() {
//         HttpClientBuilder clientBuilder = HttpClientBuilder.create();
//         if (proxySettings.getUrl() != null) {
//             URL proxyUrl = proxySettings.getUrl();
//             HttpHost proxyHost = new HttpHost(
//                     proxyUrl.getHost(),
//                     proxyUrl.getPort(),
//                     proxyUrl.getProtocol());
//             clientBuilder.setProxy(proxyHost);
//         }
//         return clientBuilder.build();
//     }
// 
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/ProxySettings.java
// @ConfigurationProperties(prefix="proxy")
// @Data
// public class ProxySettings {
// 
//     private URL url;
// 
//     private ProxyAuthenticationType authenticationType;
// 
//     private String domain;
// 
//     private String username;
// 
//     private String password;
// 
//     private String workstation;
// 
// }


import com.cisco.cta.taxii.adapter.httpclient.HttpClientFactory;
import com.cisco.cta.taxii.adapter.settings.ProxySettings;
import org.apache.http.client.HttpClient;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.net.MalformedURLException;
import java.net.URL;
import static junit.framework.TestCase.assertNotNull;
import static org.mockito.Mockito.*;
/*
   Copyright 2015 Cisco Systems

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.cisco.cta.taxii.adapter.httpclient;





public class HttpClientFactoryTest {

    @Mock
    private ProxySettings proxySettings;

    private HttpClientFactory httpClientFactory;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        httpClientFactory = new HttpClientFactory(proxySettings);
    }

    @Test
// Path: src/main/java/com/cisco/cta/taxii/adapter/httpclient/HttpClientFactory.java
// public class HttpClientFactory {
// 
//     private ProxySettings proxySettings;
// 
//     public HttpClientFactory(ProxySettings proxySettings) {
//         this.proxySettings = proxySettings;
//     }
// 
//     public HttpClient create() {
//         HttpClientBuilder clientBuilder = HttpClientBuilder.create();
//         if (proxySettings.getUrl() != null) {
//             URL proxyUrl = proxySettings.getUrl();
//             HttpHost proxyHost = new HttpHost(
//                     proxyUrl.getHost(),
//                     proxyUrl.getPort(),
//                     proxyUrl.getProtocol());
//             clientBuilder.setProxy(proxyHost);
//         }
//         return clientBuilder.build();
//     }
// 
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/ProxySettings.java
// @ConfigurationProperties(prefix="proxy")
// @Data
// public class ProxySettings {
// 
//     private URL url;
// 
//     private ProxyAuthenticationType authenticationType;
// 
//     private String domain;
// 
//     private String username;
// 
//     private String password;
// 
//     private String workstation;
// 
// }


// Path: src/test/java/com/cisco/cta/taxii/adapter/httpclient/HttpClientFactoryTest.java
import com.cisco.cta.taxii.adapter.httpclient.HttpClientFactory;
import com.cisco.cta.taxii.adapter.settings.ProxySettings;
import org.apache.http.client.HttpClient;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.net.MalformedURLException;
import java.net.URL;
import static junit.framework.TestCase.assertNotNull;
import static org.mockito.Mockito.*;

/*
   Copyright 2015 Cisco Systems

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.cisco.cta.taxii.adapter.httpclient;





public class HttpClientFactoryTest {

    @Mock
    private ProxySettings proxySettings;

    private HttpClientFactory httpClientFactory;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        httpClientFactory = new HttpClientFactory(proxySettings);
    }

    @Test
    public void create() throws MalformedURLException {