diff --git a/src/test/java/org/hisp/dhis/rules/RuleEngineVariableNameTest.java b/src/test/java/org/hisp/dhis/rules/RuleEngineVariableNameTest.java index 877ed864..749c1600 100644 --- a/src/test/java/org/hisp/dhis/rules/RuleEngineVariableNameTest.java +++ b/src/test/java/org/hisp/dhis/rules/RuleEngineVariableNameTest.java @@ -16,7 +16,6 @@ import org.junit.runners.JUnit4; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashMap; @@ -80,15 +79,13 @@ public void evaluateD2Round() RuleVariable ruleVariable7 = RuleVariableNewestEvent.create( UID0WILD2, "test_data_element7", RuleValueType.NUMERIC, true, new ArrayList<>()); - List actions = Arrays - .asList( ruleAction1, ruleAction2, ruleAction3, ruleAction4, ruleAction5, ruleAction6, ruleAction7, - ruleAction8, ruleAction9, ruleAction10 ); + List actions = List.of(ruleAction1, ruleAction2, ruleAction3, ruleAction4, ruleAction5, ruleAction6, ruleAction7, + ruleAction8, ruleAction9, ruleAction10); Rule rule = Rule.create( null, null, "true", actions, "", "" ); - List ruleVariables = Arrays - .asList( ruleVariable1, ruleVariable2, ruleVariable3, ruleVariable4, ruleVariable5, ruleVariable6, - ruleVariable7 ); + List ruleVariables = List.of(ruleVariable1, ruleVariable2, ruleVariable3, ruleVariable4, ruleVariable5, ruleVariable6, + ruleVariable7); RuleEngine.Builder ruleEngineBuilder = getRuleEngineBuilder( rule, ruleVariables ); diff --git a/src/test/java/org/hisp/dhis/rules/models/CalculatedValueTest.java b/src/test/java/org/hisp/dhis/rules/models/CalculatedValueTest.java index 7490c330..f934bf32 100644 --- a/src/test/java/org/hisp/dhis/rules/models/CalculatedValueTest.java +++ b/src/test/java/org/hisp/dhis/rules/models/CalculatedValueTest.java @@ -35,7 +35,6 @@ import org.junit.runners.JUnit4; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -64,7 +63,7 @@ public void evaluateTenThousandRulesTest() .status( RuleEnrollment.Status.ACTIVE ) .organisationUnit( "test_ou" ) .organisationUnitCode( "test_ou_code" ) - .attributeValues( Arrays.asList() ) + .attributeValues(List.of()) .build(); RuleEvent ruleEvent = RuleEvent.builder() @@ -107,7 +106,7 @@ public void sendMessageMustGetValueFromAssignAction() .status( RuleEnrollment.Status.ACTIVE ) .organisationUnit( "test_ou" ) .organisationUnitCode( "test_ou_code" ) - .attributeValues( Arrays.asList() ) + .attributeValues(List.of()) .build(); RuleEvent ruleEvent = RuleEvent.builder() @@ -172,7 +171,7 @@ public void sendMessageMustGetValueFromAssignActionInSingleExecution() .status( RuleEnrollment.Status.ACTIVE ) .organisationUnit( "test_ou" ) .organisationUnitCode( "test_ou_code" ) - .attributeValues( Arrays.asList() ) + .attributeValues(List.of()) .build(); RuleEvent ruleEvent = RuleEvent.builder()