@Test public void testIfEnabledShouldRerouteLocalhostRequest() throws ApplicationException { underTest.setEnabled(true); given(localhostRequestChecker.checkIfRequestTargetsLocalhost(Mockito.any(WilmaHttpRequest.class))).willReturn(true); underTest.process(request); verify(localhostRequestRouter).reroute(request); verify(request).setRerouted(true); }
@Override public void process(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; boolean requestNeedsRerouting = localhostRequestChecker.checkIfRequestTargetsLocalhost(request); if (requestNeedsRerouting) { localhostRequestRouter.reroute(request); request.setRerouted(true); } }
LocalhostRequestProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; boolean requestNeedsRerouting = localhostRequestChecker.checkIfRequestTargetsLocalhost(request); if (requestNeedsRerouting) { localhostRequestRouter.reroute(request); request.setRerouted(true); } } }
LocalhostRequestProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; boolean requestNeedsRerouting = localhostRequestChecker.checkIfRequestTargetsLocalhost(request); if (requestNeedsRerouting) { localhostRequestRouter.reroute(request); request.setRerouted(true); } }  }
LocalhostRequestProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; boolean requestNeedsRerouting = localhostRequestChecker.checkIfRequestTargetsLocalhost(request); if (requestNeedsRerouting) { localhostRequestRouter.reroute(request); request.setRerouted(true); } }  @Override void process(final WilmaHttpEntity entity); }
LocalhostRequestProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; boolean requestNeedsRerouting = localhostRequestChecker.checkIfRequestTargetsLocalhost(request); if (requestNeedsRerouting) { localhostRequestRouter.reroute(request); request.setRerouted(true); } }  @Override void process(final WilmaHttpEntity entity);  }