`JenkinsTest.testDoScript` does something similar, you might look at that for inspiration. Or just look for tests mentioning `GlobalMatrixAuthorizationStrategy`. `ProjectMatrixAuthorizationStrategy` should be similar except you need to add an `AuthorizationMatrixProperty` to selected jobs.