package com.nokia.sms;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;

@SpringBootTest
class ApiTest {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Test
    void test() {
        String phone = "18631393293";
        String sql = "select 1 from sms_blk.blacklist_file where phone = ? limit 1";
        try {
            jdbcTemplate.queryForMap(sql, phone);
        } catch (EmptyResultDataAccessException e) {
            e.printStackTrace();
        }
    }
}
