use of com.yahoo.jdisc.application.BindingRepository in project vespa by vespa-engine.
the class FilterTestCase method requireThatRequestFilterIsNotRunOnUnboundPath.
@Test
public void requireThatRequestFilterIsNotRunOnUnboundPath() throws Exception {
final RequestFilter filter = mock(RequestFilterMockBase.class);
final BindingRepository<RequestFilter> requestFilters = new BindingRepository<>();
requestFilters.bind("http://*/filtered/*", filter);
final BindingRepository<ResponseFilter> responseFilters = null;
final MyRequestHandler requestHandler = new MyRequestHandler();
final TestDriver testDriver = newDriver(requestHandler, requestFilters, responseFilters);
testDriver.client().get("/status.html");
assertThat(requestHandler.awaitInvocation(), is(true));
verify(filter, never()).filter(any(HttpRequest.class), any(ResponseHandler.class));
assertThat(testDriver.close(), is(true));
}
Aggregations