public static void copyConfigurationToJob(Properties props, Map<String, String> jobProps)
    throws HiveException, IOException {
    checkRequiredPropertiesAreDefined(props);
    resolveMetadata(props);
    for (Entry<Object, Object> entry : props.entrySet()) {
      String key = String.valueOf(entry.getKey());
      if (!key.equals(CONFIG_PWD) &&
          !key.equals(CONFIG_PWD_KEYSTORE) &&
          !key.equals(CONFIG_PWD_KEY) &&
          !key.equals(CONFIG_PWD_URI)) {
        jobProps.put(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
      }
    }
  }
@Test(expected = IllegalArgumentException.class)
  public void testWithUnknownDatabaseType() throws Exception {
    Properties props = new Properties();
    props.put(JdbcStorageConfig.DATABASE_TYPE.getPropertyName(), "Postgres");
    props.put(JdbcStorageConfig.JDBC_URL.getPropertyName(), "jdbc://localhost:3306/hive");
    props.put(JdbcStorageConfig.QUERY.getPropertyName(), "SELECT col1,col2,col3 FROM sometable");

    Map<String, String> jobMap = new HashMap<>();
    JdbcStorageConfigManager.copyConfigurationToJob(props, jobMap);
  }