diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDaoTestUtil.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDaoTestUtil.java deleted file mode 100644 index 91c361217f3..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/data/ITermValueSetDaoTestUtil.java +++ /dev/null @@ -1,41 +0,0 @@ -package ca.uhn.fhir.jpa.dao.data; - -/* - * #%L - * HAPI FHIR JPA Server - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.jpa.entity.TermValueSet; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; - -import java.util.List; - -/** - * Class includes a method which we wanted removed from DAO in production code, - * but was heavily used in tests, where it is OK as they test limited use cases. - */ -public interface ITermValueSetDaoTestUtil extends JpaRepository { - - // todo: JM can this be just replaced by new class method? - @Query(value="SELECT vs FROM TermValueSet vs INNER JOIN ResourceTable r ON r.myId = vs.myResourcePid WHERE vs.myUrl = :url ORDER BY r.myUpdated DESC") - List findTermValueSetByUrl(Pageable thePage, @Param("url") String theUrl); - -} diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java index cc2c8790d3c..a9062d7dcd5 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/ValueSetExpansionR4Test.java @@ -408,7 +408,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test { // Confirm we pre-expanded successfully runInTransaction(() -> { Pageable page = Pageable.unpaged(); - List valueSets = myTermValueSetDaoTestUtil.findTermValueSetByUrl(page, "http://foo/vs"); + List valueSets = myTermValueSetDao.findTermValueSetByUrl(page, "http://foo/vs"); assertEquals(1, valueSets.size()); assertEquals(TermValueSetPreExpansionStatusEnum.EXPANDED, valueSets.get(0).getExpansionStatus()); });