PentahoConnectionFactory { public static IPentahoConnection getConnection( final String datasourceType, final IPentahoSession session, final ILogger logger ) { return getConnection( datasourceType, (Properties) null, session, logger ); }  static IPentahoConnection getConnection( final String datasourceType, final IPentahoSession session,
      final ILogger logger ); static IPentahoConnection getConnection( final String datasourceType, final String connectStr,
      final IPentahoSession session, final ILogger logger ); static IPentahoConnection getConnection( final String datasourceType, final String driver,
      final String location, final String userName, final String password, final IPentahoSession session,
      final ILogger logger ); static IPentahoConnection getConnection( final String datasourceType, Properties properties,
      final IPentahoSession session, final ILogger logger );  }
@Test public void testGetConnection() { PentahoConnectionFactory factory = new PentahoConnectionFactory(); assertNotNull( factory ); String dsType = "connection-test"; IPentahoSession session = mock( IPentahoSession.class ); ILogger logger = mock( ILogger.class ); IPentahoConnection connection = PentahoConnectionFactory.getConnection( dsType, session, logger ); assertNull( connection ); String connectStr = "connect-str"; connection = PentahoConnectionFactory.getConnection( dsType, connectStr, session, logger ); assertNull( connection ); String driver = "ds-driver"; String location = "location"; String userName = "username"; String password = "password"; connection = PentahoConnectionFactory.getConnection( dsType, driver, location, userName, password, session, logger ); assertNull( connection ); connection = PentahoConnectionFactory.getConnection( dsType, null, null, null, null, session, logger ); assertNull( connection ); }