GenericJdbcConnectorUpgrader extends ConnectorConfigurableUpgrader { @Override public void upgradeLinkConfig(MLinkConfig original, MLinkConfig upgradeTarget) { ConfigurableUpgradeUtil.doUpgrade(original.getConfigs(), upgradeTarget.getConfigs()); }  @Override void upgradeLinkConfig(MLinkConfig original, MLinkConfig upgradeTarget); @Override void upgradeFromJobConfig(MFromConfig original, MFromConfig upgradeTarget); @Override void upgradeToJobConfig(MToConfig original, MToConfig upgradeTarget);  }
@Test public void testLinkConfig() { MLinkConfig originalConfigs = new MLinkConfig(ConfigUtils.toConfigs(LinkConfiguration.class)); MLinkConfig newConfigs = new MLinkConfig(ConfigUtils.toConfigs(LinkConfiguration.class)); originalConfigs.getInput("linkConfig.jdbcDriver").setValue("test-jdbcDriver"); originalConfigs.getInput("linkConfig.connectionString").setValue("test-connectionString"); originalConfigs.getInput("linkConfig.username").setValue("test-username"); originalConfigs.getInput("linkConfig.password").setValue("test-password"); originalConfigs.getInput("linkConfig.jdbcProperties").setValue("test-jdbcProperties"); upgrader.upgradeLinkConfig(originalConfigs, newConfigs); assertEquals(originalConfigs, newConfigs); assertEquals("test-jdbcDriver", newConfigs.getInput("linkConfig.jdbcDriver").getValue()); assertEquals("test-connectionString", newConfigs.getInput("linkConfig.connectionString").getValue()); assertEquals("test-username", newConfigs.getInput("linkConfig.username").getValue()); assertEquals("test-password", newConfigs.getInput("linkConfig.password").getValue()); assertEquals("test-jdbcProperties", newConfigs.getInput("linkConfig.jdbcProperties").getValue()); }