Test Inferred Entity Instances In a Test Case
To test that inferred entity instances have been correctly created:
- List the entity instances you expect to be created for each test case on the entity sheet of the test case document, adding at least one entity attribute as an expected outcome. For example, in the ServiceDelta example policy model, "the service" (inferred entity) is an input and "the action on the service" (goal) is an expected outcome on the service worksheet of the test case document.

This tests that all instances you expect to be created have been created and any entity level attributes you specified have been inferred as expected. - Add a rule to count the total number of instances. For example, in the ServiceDelta example policy model, there is a rule that counts the total number of services:
the total number of services = InstanceCount(the services)
- Set that total as an expected outcome. For example, in the ServiceDelta example policy model, "the total number of services" is an expected outcome on the Test Cases worksheet:

This tests that no additional entity instances beyond the number expected have been created.