use of org.mule.runtime.core.api.policy.PolicyStateId in project mule by mulesoft.
the class DefaultPolicyStateHandlerTestCase method sameExecutionDifferentPolicyId.
@Test
public void sameExecutionDifferentPolicyId() {
PolicyStateId policy1StateExecutionId = new PolicyStateId(TEST_EXECUTION_ID, TEST_POLICY_ID);
PolicyStateId policy2StateExecutionId = new PolicyStateId(TEST_EXECUTION_ID, TEST_POLICY_ID2);
defaultPolicyStateHandler.updateState(policy1StateExecutionId, eventTestExecutionId);
defaultPolicyStateHandler.updateState(policy2StateExecutionId, eventTestExecutionId2);
assertThat(defaultPolicyStateHandler.getLatestState(policy1StateExecutionId).get(), is(eventTestExecutionId));
assertThat(defaultPolicyStateHandler.getLatestState(policy2StateExecutionId).get(), is(eventTestExecutionId2));
}
use of org.mule.runtime.core.api.policy.PolicyStateId in project mule by mulesoft.
the class DefaultPolicyStateHandlerTestCase method samePolicyDifferentExecutionId.
@Test
public void samePolicyDifferentExecutionId() {
PolicyStateId policyStateExecutionId = new PolicyStateId(TEST_EXECUTION_ID, TEST_POLICY_ID);
PolicyStateId policyStateExecutionId2 = new PolicyStateId(TEST_EXECUTION_ID2, TEST_POLICY_ID);
defaultPolicyStateHandler.updateState(policyStateExecutionId, eventTestExecutionId);
defaultPolicyStateHandler.updateState(policyStateExecutionId2, eventTestExecutionId2);
assertThat(defaultPolicyStateHandler.getLatestState(policyStateExecutionId).get(), is(eventTestExecutionId));
assertThat(defaultPolicyStateHandler.getLatestState(policyStateExecutionId2).get(), is(eventTestExecutionId2));
}
Aggregations