From 6200cd2ddcefd3aaaa54a149534bb6cd04ead4f6 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 19 Feb 2020 21:21:22 -0500 Subject: [PATCH] Add test asserts --- .../ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java index b982fb093a8..b2999af3bde 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java @@ -227,10 +227,14 @@ public class PersistedJpaBundleProvider implements IBundleProvider { template.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus theStatus) { - ensureSearchEntityLoaded(); + boolean entityLoaded = ensureSearchEntityLoaded(); + assert entityLoaded; } }); + assert mySearchEntity != null; + assert mySearchEntity.getSearchType() != null; + switch (mySearchEntity.getSearchType()) { case HISTORY: return template.execute(theStatus -> doHistoryInTransaction(theFromIndex, theToIndex));