diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2ebbe2..10adf49a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,16 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: '17' - name: Run Unit tests and generate report - run: mvn -B clean test jacoco:report --file pom.xml --file README.md --file LICENSE + run: mvn -B clean test jacoco:report --file pom.xml --file README.md --file LICENSE -X -e + env: + PROXY_TO: "https://my.test-server.org/fhir" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 diff --git a/exec/pom.xml b/exec/pom.xml index f6cebec4..957a5a51 100755 --- a/exec/pom.xml +++ b/exec/pom.xml @@ -4,7 +4,7 @@ org.smartregister opensrp-gateway-plugin - 2.0.8 + 2.1.1 exec @@ -12,7 +12,7 @@ ${project.parent.basedir} - 2.7.5 + 3.3.4 true @@ -46,13 +46,13 @@ com.google.fhir.gateway server - 0.3.1 + ${fhir.gateway.version} com.google.fhir.gateway plugins - 0.3.1 + ${fhir.gateway.version} @@ -70,7 +70,7 @@ org.smartregister plugins - 2.0.8 + 2.1.1 @@ -98,7 +98,7 @@ org.smartregister.fhir.gateway.MainApp - - javax.servlet - javax.servlet-api - 4.0.1 - provided + jakarta.servlet + jakarta.servlet-api + ${jakarta-servlet.version} ca.uhn.hapi.fhir @@ -51,12 +51,12 @@ io.sentry sentry-logback - 7.6.0 + ${sentry.version} io.sentry - sentry-spring-boot-starter - 7.6.0 + sentry-spring-boot-starter-jakarta + ${sentry.version} diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java index d7fa9ad6..a16ed3fd 100644 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java @@ -10,9 +10,6 @@ import java.util.Map; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import javax.servlet.http.HttpServletRequest; - import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.r4.model.Binary; import org.hl7.fhir.r4.model.Bundle; @@ -37,6 +34,8 @@ import ca.uhn.fhir.rest.gclient.TokenClientParam; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import jakarta.annotation.Nullable; +import jakarta.servlet.http.HttpServletRequest; public class LocationHierarchyEndpointHelper { diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java index 3fc62418..84720e00 100755 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java @@ -17,7 +17,6 @@ import org.hl7.fhir.r4.model.CareTeam; import org.hl7.fhir.r4.model.Composition; import org.hl7.fhir.r4.model.Organization; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.smartregister.fhir.gateway.plugins.interfaces.ResourceFinder; @@ -40,6 +39,7 @@ import ca.uhn.fhir.rest.api.SearchStyleEnum; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; +import jakarta.annotation.Nonnull; public class PermissionAccessChecker implements AccessChecker { private static final Logger logger = LoggerFactory.getLogger(PermissionAccessChecker.class); @@ -282,7 +282,7 @@ private List getLocationUuids(String[] syncLocations) { return locationUuids; } - @NotNull + @Nonnull private Map> collateSyncStrategyIds( String syncStrategy, PractitionerDetails practitionerDetails, diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java index 9db8d575..2996f01f 100755 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java @@ -23,20 +23,20 @@ import org.hl7.fhir.r4.model.OrganizationAffiliation; import org.hl7.fhir.r4.model.Practitioner; import org.hl7.fhir.r4.model.PractitionerRole; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.smartregister.model.location.LocationHierarchy; import org.smartregister.model.location.ParentChildrenMap; import org.smartregister.model.practitioner.FhirPractitionerDetails; import org.smartregister.model.practitioner.PractitionerDetails; -import org.springframework.lang.Nullable; import com.google.common.annotations.VisibleForTesting; import ca.uhn.fhir.rest.api.SearchStyleEnum; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.gclient.ReferenceClientParam; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; public class PractitionerDetailsEndpointHelper { private static final Logger logger = @@ -160,7 +160,7 @@ protected Bundle getAttributedPractitionerDetailsByPractitioner(Practitioner pra return responseBundle; } - @NotNull + @Nonnull public static Set getAttributedLocations(List locationHierarchies) { List parentChildrenList = locationHierarchies.stream() diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/RestUtils.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/RestUtils.java index 5afb3a44..5d07a384 100644 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/RestUtils.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/RestUtils.java @@ -2,9 +2,6 @@ import static org.smartregister.fhir.gateway.plugins.Constants.AUTHORIZATION; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -12,6 +9,8 @@ import com.google.fhir.gateway.TokenVerifier; import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class RestUtils { diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecision.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecision.java index cb78dabd..d67eb89c 100755 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecision.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecision.java @@ -13,8 +13,6 @@ import java.util.Map; import java.util.stream.Collectors; -import javax.annotation.Nullable; - import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpResponse; @@ -25,7 +23,6 @@ import org.hl7.fhir.r4.model.ListResource; import org.hl7.fhir.r4.model.OperationOutcome; import org.hl7.fhir.r4.model.Resource; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,6 +39,8 @@ import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; import lombok.Getter; public class SyncAccessDecision implements AccessDecision { @@ -152,7 +151,7 @@ public RequestMutation getRequestMutation(RequestDetailsReader requestDetailsRea requestMutation = RequestMutation.builder() - .queryParams( + .additionalQueryParams( Map.of( Constants.TAG_SEARCH_PARAM, List.of( @@ -359,7 +358,7 @@ private boolean includeAttributedPractitioners(String requestPath) { && SyncAccessDecisionConstants.ENDPOINT_PRACTITIONER_DETAILS.equals(requestPath); } - @NotNull + @Nonnull private static OperationOutcome createOperationOutcome(String exception) { OperationOutcome operationOutcome = new OperationOutcome(); OperationOutcome.OperationOutcomeIssueComponent operationOutcomeIssueComponent = @@ -371,7 +370,7 @@ private static OperationOutcome createOperationOutcome(String exception) { return operationOutcome; } - @NotNull + @Nonnull private static Bundle processListEntriesGatewayModeByListResource( ListResource responseListResource, int start, int count) { Bundle requestBundle = new Bundle(); @@ -418,7 +417,7 @@ private Bundle processListEntriesGatewayModeByBundle( return requestBundle.setEntry(bundleEntryComponentList); } - @NotNull + @Nonnull static Bundle.BundleEntryComponent createBundleEntryComponent( Bundle.HTTPVerb method, String requestPath, @Nullable String condition) { diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpoint.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpoint.java index 80c01144..a4fe70eb 100644 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpoint.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpoint.java @@ -6,10 +6,6 @@ import java.io.PrintWriter; import java.nio.charset.StandardCharsets; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.smartregister.fhir.gateway.plugins.RestUtils; @@ -18,14 +14,25 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public abstract class BaseEndpoint extends HttpServlet { private static final Logger logger = LoggerFactory.getLogger(BaseEndpoint.class); - protected final TokenVerifier tokenVerifier = TokenVerifier.createFromEnvVars(); - protected final FhirContext fhirR4Context = FhirContext.forR4(); + protected static TokenVerifier tokenVerifier; + protected final FhirContext fhirR4Context = FhirContext.forR4Cached(); protected final IParser fhirR4JsonParser = fhirR4Context.newJsonParser().setPrettyPrint(true); + static { + try { + tokenVerifier = TokenVerifier.createFromEnvVars(); + } catch (Exception exception) { + logger.error(exception.getMessage()); + } + } + @Override protected void doOptions(HttpServletRequest request, HttpServletResponse response) { RestUtils.addCorsHeaders(response); diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/LocationHierarchyEndpoint.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/LocationHierarchyEndpoint.java index b0c79f9f..bac1b75a 100644 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/LocationHierarchyEndpoint.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/LocationHierarchyEndpoint.java @@ -4,10 +4,6 @@ import java.io.IOException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.apache.http.HttpStatus; import org.hl7.fhir.r4.model.Bundle; import org.smartregister.fhir.gateway.plugins.Constants; @@ -18,6 +14,9 @@ import com.auth0.jwt.interfaces.DecodedJWT; import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; @WebServlet("/LocationHierarchy") public class LocationHierarchyEndpoint extends BaseEndpoint { diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/PractitionerDetailEndpoint.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/PractitionerDetailEndpoint.java index 3f174177..35412a5a 100755 --- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/PractitionerDetailEndpoint.java +++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/endpoint/PractitionerDetailEndpoint.java @@ -5,10 +5,6 @@ import java.io.IOException; import java.util.Collections; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.apache.http.HttpStatus; import org.smartregister.fhir.gateway.plugins.Constants; import org.smartregister.fhir.gateway.plugins.PractitionerDetailsEndpointHelper; @@ -17,6 +13,9 @@ import org.smartregister.model.practitioner.PractitionerDetails; import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; @WebServlet("/PractitionerDetail") public class PractitionerDetailEndpoint extends BaseEndpoint { diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java index befa60a7..b356e457 100644 --- a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java +++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java @@ -12,8 +12,6 @@ import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; - import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.CodeableConcept; @@ -37,6 +35,7 @@ import ca.uhn.fhir.rest.gclient.IQuery; import ca.uhn.fhir.rest.gclient.IUntypedQuery; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import jakarta.servlet.http.HttpServletRequest; public class LocationHierarchyEndpointHelperTest { diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/RestUtilTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/RestUtilTest.java index 03726512..fef62f98 100644 --- a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/RestUtilTest.java +++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/RestUtilTest.java @@ -5,14 +5,14 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import org.junit.Test; import org.mockito.Mockito; import com.google.fhir.gateway.TokenVerifier; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + public class RestUtilTest { @Test(expected = RuntimeException.class) diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecisionTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecisionTest.java index 244c337d..c3c7ef60 100755 --- a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecisionTest.java +++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/SyncAccessDecisionTest.java @@ -83,9 +83,10 @@ public void preProcessShouldAddLocationIdFiltersWhenUserIsAssignedToLocationsOnl Assert.assertFalse(requestDetails.getCompleteUrl().contains(locationId)); Assert.assertFalse(requestDetails.getRequestPath().contains(locationId)); } + assert mutatedRequest != null; Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -95,7 +96,8 @@ public void preProcessShouldAddLocationIdFiltersWhenUserIsAssignedToLocationsOnl + Constants.DEFAULT_LOCATION_TAG_URL + Constants.CODE_URL_VALUE_SEPARATOR))); - for (String param : mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM)) { + for (String param : + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM)) { Assert.assertFalse(param.contains(Constants.DEFAULT_CARE_TEAM_TAG_URL)); Assert.assertFalse(param.contains(Constants.DEFAULT_ORGANISATION_TAG_URL)); } @@ -180,7 +182,7 @@ public void preProcessWhenNotOneClientRoleIsAddedShouldThrowError() throws IOExc } Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -190,7 +192,8 @@ public void preProcessWhenNotOneClientRoleIsAddedShouldThrowError() throws IOExc + Constants.DEFAULT_RELATED_ENTITY_TAG_URL + Constants.CODE_URL_VALUE_SEPARATOR))); - for (String param : mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM)) { + for (String param : + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM)) { Assert.assertFalse(param.contains(Constants.DEFAULT_CARE_TEAM_TAG_URL)); Assert.assertFalse(param.contains(Constants.DEFAULT_ORGANISATION_TAG_URL)); } @@ -258,12 +261,15 @@ public void preProcessWhenNotOneClientRoleIsAddedShouldThrowError() throws IOExc Assert.assertEquals( expected.substring(0, expected.length() - 1), - mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM).get(0)); + mutatedRequest + .getAdditionalQueryParams() + .get(Constants.TAG_SEARCH_PARAM) + .get(0)); Collections.reverse(relatedEntityLocationIds); Assert.assertFalse( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -371,7 +377,7 @@ public void preProcessShouldAddCareTeamIdFiltersWhenUserIsAssignedToCareTeamsOnl Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -381,7 +387,8 @@ public void preProcessShouldAddCareTeamIdFiltersWhenUserIsAssignedToCareTeamsOnl + Constants.DEFAULT_CARE_TEAM_TAG_URL + Constants.CODE_URL_VALUE_SEPARATOR))); - for (String param : mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM)) { + for (String param : + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM)) { Assert.assertFalse(param.contains(Constants.DEFAULT_LOCATION_TAG_URL)); Assert.assertFalse(param.contains(Constants.DEFAULT_ORGANISATION_TAG_URL)); } @@ -410,7 +417,7 @@ public void preProcessShouldAddOrganisationIdFiltersWhenUserIsAssignedToOrganisa Assert.assertFalse(requestDetails.getRequestPath().contains(locationId)); Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .contains( Constants.DEFAULT_ORGANISATION_TAG_URL @@ -418,7 +425,8 @@ public void preProcessShouldAddOrganisationIdFiltersWhenUserIsAssignedToOrganisa + locationId)); } - for (String param : mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM)) { + for (String param : + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM)) { Assert.assertFalse(param.contains(Constants.DEFAULT_LOCATION_TAG_URL)); Assert.assertFalse(param.contains(Constants.DEFAULT_CARE_TEAM_TAG_URL)); } @@ -445,11 +453,11 @@ public void preProcessShouldAddFiltersWhenResourceNotInSyncFilterIgnoredResource for (String locationId : organisationIds) { Assert.assertFalse(requestDetails.getCompleteUrl().contains(locationId)); Assert.assertFalse(requestDetails.getRequestPath().contains(locationId)); - Assert.assertEquals(1, mutatedRequest.getQueryParams().size()); + Assert.assertEquals(1, mutatedRequest.getAdditionalQueryParams().size()); } Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -557,7 +565,7 @@ public void preProcessShouldSkipAddingFiltersWhenResourceInSyncFilterIgnoredReso testInstance.getRequestMutation(new TestRequestDetailsToReader(requestDetails)); List searchParamArrays = - mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM); + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM); Assert.assertNotNull(searchParamArrays); Assert.assertTrue( @@ -1013,7 +1021,7 @@ public void preProcessWhenRequestIsAnOperationRequestShouldAddFilters() { } Assert.assertTrue( mutatedRequest - .getQueryParams() + .getAdditionalQueryParams() .get(Constants.TAG_SEARCH_PARAM) .get(0) .contains( @@ -1023,7 +1031,8 @@ public void preProcessWhenRequestIsAnOperationRequestShouldAddFilters() { + Constants.DEFAULT_LOCATION_TAG_URL + Constants.CODE_URL_VALUE_SEPARATOR))); - for (String param : mutatedRequest.getQueryParams().get(Constants.TAG_SEARCH_PARAM)) { + for (String param : + mutatedRequest.getAdditionalQueryParams().get(Constants.TAG_SEARCH_PARAM)) { Assert.assertFalse(param.contains(Constants.DEFAULT_CARE_TEAM_TAG_URL)); Assert.assertFalse(param.contains(Constants.DEFAULT_ORGANISATION_TAG_URL)); } diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpointTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpointTest.java new file mode 100644 index 00000000..7d8aa4c3 --- /dev/null +++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/endpoint/BaseEndpointTest.java @@ -0,0 +1,21 @@ +package org.smartregister.fhir.gateway.plugins.endpoint; + +import java.io.IOException; + +import org.junit.Assert; +import org.junit.Test; + +public class BaseEndpointTest { + + @Test + public void testBaseEndpointInstanceCreation() throws IOException { + + TestBaseEndpoint baseEndpoint = new TestBaseEndpoint(); + Assert.assertNotNull(baseEndpoint); + } + + static class TestBaseEndpoint extends BaseEndpoint { + + protected TestBaseEndpoint() throws IOException {} + } +} diff --git a/pom.xml b/pom.xml index 074b0d7a..5fec342b 100755 --- a/pom.xml +++ b/pom.xml @@ -6,12 +6,12 @@ implementations do not have to do this; they can redeclare those deps. --> com.google.fhir.gateway fhir-gateway - 0.3.2 + 0.4.0 org.smartregister opensrp-gateway-plugin - 2.0.8 + 2.1.1 pom @@ -20,19 +20,20 @@ - 2.30.0 + 2.43.0 + 0.4.0 - - - ca.uhn.hapi.fhir - hapi-fhir-client - ${hapifhir_version} - - - + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.source} + ${maven.compiler.target} + + com.mycila license-maven-plugin