Search in sources :

Example 1 with Function

use of org.forgerock.guava.common.base.Function in project OpenAM by OpenRock.

the class SmsRouteTreeLeafTest method setup.

@BeforeClass
public void setup() {
    Router router = new Router();
    Function<String, Boolean> handlesFunction = new Function<String, Boolean>() {

        @Nullable
        @Override
        public Boolean apply(String serviceName) {
            return "SERVICE_NAME".equals(serviceName);
        }
    };
    routeTree = new SmsRouteTreeLeaf(Collections.<MatchingResourcePath, CrestAuthorizationModule>emptyMap(), null, router, handlesFunction, null, resourcePath(""));
}
Also used : Function(org.forgerock.guava.common.base.Function) Router(org.forgerock.json.resource.Router) CrestAuthorizationModule(org.forgerock.authz.filter.crest.api.CrestAuthorizationModule) MatchingResourcePath(org.forgerock.openam.forgerockrest.utils.MatchingResourcePath) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

CrestAuthorizationModule (org.forgerock.authz.filter.crest.api.CrestAuthorizationModule)1 Function (org.forgerock.guava.common.base.Function)1 Router (org.forgerock.json.resource.Router)1 MatchingResourcePath (org.forgerock.openam.forgerockrest.utils.MatchingResourcePath)1 BeforeClass (org.testng.annotations.BeforeClass)1