'DataSource Must not be null Spring boot 2.5.7 Upgrade- JUnit testcase fails

This is my data source code

Here is some description. java. lang. IllegalArgumentException: DataSource must not be null

at org.springframework.util.Assert.notNull(Assert.java:201)
at org.springframework.jdbc.datasource.lookup.SingleDataSourceLookup.<init>(SingleDataSourceLookup.java:40)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.setDataSource(LocalContainerEntityManagerFactoryBean.java:257)
at org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder$Builder.build(EntityManagerFactoryBuilder.java:234)
at com.cardinalhealth.nphsden.framework.utils.DbUtils.getEntityManagerFactory(DbUtils.java:38)
at com.cardinalhealth.nphsden.framework.utils.DbUtilsTest.testGetEntityManagerFactory(DbUtilsTest.java:53)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source