This commit is contained in:
James Agnew 2024-10-24 17:22:27 -04:00
parent a0f66eb53a
commit 026d57394c
1 changed files with 3 additions and 2 deletions

View File

@ -190,7 +190,7 @@ public class CrossPartitionReferencesTest extends BaseJpaR5Test {
}
private void initializeCrossReferencesInterceptor() {
when(myCrossPartitionReferencesDetectedInterceptor.handle(any(),any())).thenAnswer(t->{
when(myCrossPartitionReferencesDetectedInterceptor.handle(any(), any())).thenAnswer(t -> {
CrossPartitionReferenceDetails theDetails = t.getArgument(1, CrossPartitionReferenceDetails.class);
IIdType targetId = theDetails.getPathAndRef().getRef().getReferenceElement();
RequestPartitionId referenceTargetPartition = myPartitionHelperSvc.determineReadPartitionForRequestForRead(theDetails.getRequestDetails(), targetId.getResourceType(), targetId);
@ -232,11 +232,12 @@ public class CrossPartitionReferencesTest extends BaseJpaR5Test {
private static RequestPartitionId selectPartition(String resourceType) {
switch (resourceType) {
case "Patient":
case "RelatedPerson":
return PARTITION_PATIENT;
case "Observation":
return PARTITION_OBSERVATION;
default:
throw new InternalErrorException("Don't know how to handle resource type");
throw new InternalErrorException("Don't know how to handle resource type: " + resourceType);
}
}