### Question:
HiveClient implements AutoCloseable { public void insert(HiveRule rule, Event event) { String sql = toInsertSQL(rule, event); try (Connection conn = getConnection(); Statement stmt = conn.createStatement()) { stmt.execute(sql); log.info("execute hive insert sql:{} success", sql); } catch (Exception e) { log.info("execute hive insert sql:{} failure", sql, e); } } HiveClient(HiveConfig hiveConfig); void insert(HiveRule rule, Event event); void update(HiveRule rule, Event event); void delete(HiveRule rule, Event event); @Override void close();  }### Answer:
@Test public void test_insert() { HiveConfig config = new HiveConfig(); config.setHiveUrl("jdbc:hive2: HiveClient hiveClient = new HiveClient(config); hiveClient.insert(null, newEvent()); }