### Question:
RestAPIAuthorizationFilter extends AbstractAuthorizationFilter { protected boolean checkPermissions(final HttpServletRequest request) throws ServletException { final RestRequestParser restRequestParser = new RestRequestParser(request).invoke(); return checkPermissions(request, restRequestParser.getApiName(), restRequestParser.getResourceName(), restRequestParser.getResourceQualifiers()); } RestAPIAuthorizationFilter(final boolean reload);  RestAPIAuthorizationFilter();  static final String SCRIPT_TYPE_AUTHORIZATION_PREFIX; }### Answer:
@Test public void should_checkPermissions_parse_the_request() throws Exception { doReturn("API/bpm/case/15").when(request).getPathInfo(); final RestAPIAuthorizationFilter restAPIAuthorizationFilterSpy = spy(restAPIAuthorizationFilter); doReturn(true).when(restAPIAuthorizationFilterSpy).checkPermissions(eq(request), eq("bpm"), eq("case"), eq(APIID.makeAPIID(15l))); restAPIAuthorizationFilterSpy.checkPermissions(request); verify(restAPIAuthorizationFilterSpy).checkPermissions(eq(request), eq("bpm"), eq("case"), eq(APIID.makeAPIID(15l))); }