public void testOnRouteRequestWhenOnBadRequest() throws Exception {
FilterChain filterChain = Mockito.mock(FilterChain.class);
Mockito.when(route.getFilterChain()).thenReturn(filterChain);
BadRequestException badRequest
= new BadRequestException("That's a BadRequest that should be handled by onBadRequest");
Mockito.when(filterChain.next(contextImpl)).thenThrow(badRequest);
ninjaDefault.onRouteRequest(contextImpl);