OperationServiceImpl extends BaseServiceImpl<Operation> implements OperationService { @Override public Setup setup(Operation operation) { return new Setup(operation); }  @Override Operation getByName(String name); @Override Operation getById(UUID id); @Override @Produces @NamedOperation Operation produceOperationByName(InjectionPoint injectionPoint); @Override Setup setup(Operation operation); @Override Setup setup(String operationName);  }
@Test public void testSetupAndRetrieveWithBasicRoles() { Operation operation = operationService .setup("foo-create") .add("SuperUser") .make(); Set<Role> roles = permissionService.getPermittedRoles(operation); assertEquals("Operation should be permitted only for super user", 1, roles.size()); }