### Question:
ResourceWatcherRequestHandler extends RequestHandlerSupport { @Override public boolean accept(final HttpServletRequest request) { final boolean isHandlerRequest = isHandlerRequest(request); return isHandlerRequest && isAuthorized(request); } ResourceWatcherRequestHandler(); @Override void handle(final HttpServletRequest request, final HttpServletResponse response); @Override boolean accept(final HttpServletRequest request); static String createHandlerRequestPath(final CacheKey cacheKey, final HttpServletRequest request); static final String ALIAS; }### Answer:
@Test public void shouldNotAcceptRequestThatIsNotDispatchedByServer() { when(request.getRequestURI()).thenReturn("wroAPI/resourceWatch"); assertFalse(victim.accept(request)); }
@Test public void shouldNotAcceptRequest() { when(request.getRequestURI()).thenReturn("wroApi/somethingElse"); assertFalse(victim.accept(request)); }