<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">
    <import resource="classpath:applicationContext.xml"/>
    <bean id="hibernateConfiguration" factory-bean="&amp;sessionFactory" factory-method="getConfiguration"/>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
    <import resource="classpath:applicationContext.xml"/>
    <!-- replace the normal database with an embedded one -->
    <jdbc:embedded-database type="H2" id="xmlDataSource" />
    <bean id="hibernateConfiguration" factory-bean="&amp;sessionFactory" factory-method="getConfiguration"/>
</beans>
Replace database with in-memory one for testing
Replace database with in-memory one for testing
