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