@Test public void testConnectorDataSource_Missing() { assertThrows(LmRuntimeException.class, () -> factory.connectorDataSource("ds3")); }
DataSource connectorDataSource(String id) { DataSource ds = dataSources.get(id); if (ds == null) { throw new LmRuntimeException("Unknown connector ID: " + id + "; available IDs: " + dataSources.keySet()); } return ds; }
DataSourceConnectorFactory implements IConnectorFactory<JdbcConnector> { DataSource connectorDataSource(String id) { DataSource ds = dataSources.get(id); if (ds == null) { throw new LmRuntimeException("Unknown connector ID: " + id + "; available IDs: " + dataSources.keySet()); } return ds; } }
DataSourceConnectorFactory implements IConnectorFactory<JdbcConnector> { DataSource connectorDataSource(String id) { DataSource ds = dataSources.get(id); if (ds == null) { throw new LmRuntimeException("Unknown connector ID: " + id + "; available IDs: " + dataSources.keySet()); } return ds; } DataSourceConnectorFactory(Map<String, DataSource> dataSources); }
DataSourceConnectorFactory implements IConnectorFactory<JdbcConnector> { DataSource connectorDataSource(String id) { DataSource ds = dataSources.get(id); if (ds == null) { throw new LmRuntimeException("Unknown connector ID: " + id + "; available IDs: " + dataSources.keySet()); } return ds; } DataSourceConnectorFactory(Map<String, DataSource> dataSources); @Override JdbcConnector createConnector(String id); }
DataSourceConnectorFactory implements IConnectorFactory<JdbcConnector> { DataSource connectorDataSource(String id) { DataSource ds = dataSources.get(id); if (ds == null) { throw new LmRuntimeException("Unknown connector ID: " + id + "; available IDs: " + dataSources.keySet()); } return ds; } DataSourceConnectorFactory(Map<String, DataSource> dataSources); @Override JdbcConnector createConnector(String id);  }