SecurityPoliciesProcessInstanceRestrictionApplier implements SecurityPoliciesRestrictionApplier<GetProcessInstancesPayload> { @Override public GetProcessInstancesPayload denyAll() { return ProcessPayloadBuilder.processInstances().withProcessDefinitionKey("missing-" + UUID.randomUUID().toString()).build(); }  @Override GetProcessInstancesPayload restrictToKeys(Set<String> keys); @Override GetProcessInstancesPayload denyAll(); @Override GetProcessInstancesPayload allowAll();  }
@Test public void denyAllShouldAddUnmatchableFilter() { GetProcessInstancesPayload filter = restrictionApplier.denyAll(); assertThat(filter.getProcessDefinitionKeys()).hasSize(1); assertThat(filter.getProcessDefinitionKeys().iterator().next()).startsWith("missing-"); }