Improve test coverage for requestdbclient
[so.git] / mso-api-handlers / mso-requests-db-repositories / src / test / java / org / onap / so / TestApplication.java
index 00d212a..5b6fbc8 100644 (file)
@@ -22,7 +22,10 @@ package org.onap.so;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Profile;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+import org.springframework.web.client.RestTemplate;
 
 @SpringBootApplication(scanBasePackages = { "org.onap.so.db" })
 @Profile("test")
@@ -32,4 +35,8 @@ public class TestApplication {
                System.getProperties().setProperty("mso.db", "MARIADB");
                System.getProperties().setProperty("server.name", "Springboot");
        }
+       @Bean
+       public RestTemplate restTemplate() {
+               return new RestTemplate( new HttpComponentsClientHttpRequestFactory());
+       }
 }