class SmsRealmProvider implements RequestHandler {

    protected String getExpectedPathFromRequestContext(UpdateRequest request)
            throws org.forgerock.oauth2.core.exceptions.NotFoundException {
        String contextPath = request.getContent().get(PATH_ATTRIBUTE_NAME).asString();
        String realmName = request.getContent().get(REALM_NAME_ATTRIBUTE_NAME).asString();

        if (contextPath.endsWith("/")) {
            contextPath = contextPath.substring(0, contextPath.lastIndexOf('/'));
        }
        if (!realmName.startsWith("/")) {
            realmName = "/" + realmName;
        }
        return realmNormaliser.normalise(contextPath + realmName);
    }

    public  SmsRealmProvider(SessionCache sessionCache,
                            CoreWrapper coreWrapper,
                            RealmNormaliser realmNormaliser);

}