6. 커넥션 풀 테스트 코드를 코딩 하시오.
package edu.sejong.ex;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@SpringBootTest
class ConnectionPoolTest {
@Autowired
private DataSource dataSource;
@Test
void test() throws SQLException {
assertNotNull(dataSource);
log.info("dataSource: " + dataSource);
log.info("connection: " + dataSource.getConnection());
}
}