title: Spring boot integration test with multiple data sources getting url cannot be null
body: <p>Currently, I am working on spring boot application, we are connecting mysql as part of the main database and H2 Db(in memory) as part of integration testing. Now we have requirement to add two more databases, I am connecting multiple data source by providing multiple data sources in application.properties</p>
  
  <pre><code>spring.mys.datasource.url=jdbc:mysql://17.27.24.33:3306/my-db
  spring.mys.datasource.username=root
  spring.mys.datasource.password=1234
  spring.mys.datasource.driver-class-name=com.mysql.jdbc.Driver
  
  spring.teradata.datasource.url=jdbc:mysql://17.27.24.33:3306/mydb
  spring.teradata.datasource.username=root
  spring.teradata.datasource.password=password
  spring.teradata.datasource.driver-class-name=com.mysql.jdbc.Driver
  </code></pre>
  
  <p>and when we are having single data source I am able to connect to HSQL in memory db as part for test application.properties with profile test</p>
  
  <pre><code>spring.jpa.database: HSQL          
  spring.jpa.hibernate.ddl-auto=create-drop          
  spring.profiles.active=test  
  </code></pre>
  
  <p>After adding second data source my integration testing got failed with below error. Basically, we need to implement integration test for both data sources. appreciate any help, thanks.</p>
  
  <p>Our code in the integration test</p>
  
  <pre><code>    @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
      @ContextConfiguration(classes = { ServiceConfig.class, JWTProtectedWebSecurity.class })
      public abstract class BaseIRTest  {
      }
  </code></pre>
  
  <p>See the error below while running the maven test</p>
  
  <pre><code>2017-11-22 12:31:04.479 ERROR 14648 --- [           main] o.a.tomcat.jdbc.pool.ConnectionPool      : Unable to create initial connections of pool.
  
  java.sql.SQLException: The url cannot be null
      at java.sql.DriverManager.getConnection(DriverManager.java:649) ~[na:1.8.0_60]
      at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[na:1.8.0_60]
      at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308) ~[tomcat-jdbc-8.5.11.jar:na]
      at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203) ~[tomcat-jdbc-8.5.11.jar:na]
      at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:732) [tomcat-jdbc-8.5.11.jar:na]
      at 
  </code></pre>