diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java index 464adce1f57..a972614a2b0 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaProvider.java @@ -44,13 +44,19 @@ import java.util.TreeSet; public class BaseJpaProvider { public static final String REMOTE_ADDR = "req.remoteAddr"; public static final String REMOTE_UA = "req.userAgent"; - + private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseJpaProvider.class); @Autowired protected DaoConfig myDaoConfig; - - private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseJpaProvider.class); private FhirContext myContext; + public BaseJpaProvider() { + super(); + } + + public void setDaoConfigForUnitTest(DaoConfig theDaoConfig) { + myDaoConfig = theDaoConfig; + } + protected ExpungeOptions createExpungeOptions(IPrimitiveType theLimit, IPrimitiveType theExpungeDeletedResources, IPrimitiveType theExpungeOldVersions, IPrimitiveType theExpungeEverything) { ExpungeOptions options = new ExpungeOptions(); if (theLimit != null && theLimit.getValue() != null) {