### Question:
VirtualReportDataSourceServiceFactory extends JdbcReportDataSourceServiceFactory { public ReportDataSourceService createService(ReportDataSource dataSource) { if (dataSource instanceof VirtualReportDataSource) { DataSource ds; VirtualReportDataSource virtualDataSource = (VirtualReportDataSource) dataSource; TimeZone timeZone = getTimeZoneByDataSourceTimeZone(virtualDataSource.getTimezone()); try { ds = virtualDataSourceHandler.getSqlDataSource(ExecutionContextImpl.getRuntimeExecutionContext(), virtualDataSource); return new VirtualDataSourceService(ds, timeZone); } catch (JSResourceAcessDeniedException accessDeniedEx) { if (log.isDebugEnabled()) log.debug(accessDeniedEx, accessDeniedEx); throw accessDeniedEx; } catch (Exception e) { if (log.isDebugEnabled()) log.debug(e, e); throw new JSExceptionWrapper(e); } } else { if (dataSource instanceof AwsReportDataSource) { return awsDataSourceServiceFactory.createService(dataSource); } else if (dataSource instanceof AzureSqlReportDataSource) { return azureSqlDataSourceServiceFactory.createService(dataSource); } else { return super.createService(dataSource); } } } VirtualReportDataSourceServiceFactory(); VirtualDataSourceHandler getVirtualDataSourceHandler(); void setAwsDataSourceServiceFactory(ReportDataSourceServiceFactory awsDataSourceServiceFactory); void setAzureSqlDataSourceServiceFactory(ReportDataSourceServiceFactory azureSqlDataSourceServiceFactory); void setVirtualDataSourceHandler(VirtualDataSourceHandler virtualDataSourceHandler); ReportDataSourceService createService(ReportDataSource dataSource);  }### Answer:
@Test public void getDataSourceService_VerifyVirtualService() throws SQLException { ReportDataSourceService service = virtualReportDataSourceServiceFactory.createService(new VirtualReportDataSourceImpl()); Assert.assertEquals(service instanceof VirtualDataSourceService, true); Assert.assertEquals(((VirtualDataSourceService)service).testConnection(), true); }