@Test public void rendersTruePipeWhenPredicateIsTrue() throws ServletException, IOException { when(predicate.test(request)).thenReturn(true); boolean outcome = renderingPipelineBranchPoint.renderStateIfApplicable(request, response); assertTrue("Expected outcome == true", outcome); verify(alternatePipe).renderState(request, response); }
public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final boolean rslt = predicate.test(request); if (rslt) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, order); alternatePipe.renderState(request, response); } else { logger.debug( "Bypassing alternate pipe [{}] for branch point with order={}", alternatePipe, order); } return rslt; }
RenderingPipelineBranchPoint implements Comparable<RenderingPipelineBranchPoint> { public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final boolean rslt = predicate.test(request); if (rslt) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, order); alternatePipe.renderState(request, response); } else { logger.debug( "Bypassing alternate pipe [{}] for branch point with order={}", alternatePipe, order); } return rslt; } }
RenderingPipelineBranchPoint implements Comparable<RenderingPipelineBranchPoint> { public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final boolean rslt = predicate.test(request); if (rslt) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, order); alternatePipe.renderState(request, response); } else { logger.debug( "Bypassing alternate pipe [{}] for branch point with order={}", alternatePipe, order); } return rslt; }  }
RenderingPipelineBranchPoint implements Comparable<RenderingPipelineBranchPoint> { public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final boolean rslt = predicate.test(request); if (rslt) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, order); alternatePipe.renderState(request, response); } else { logger.debug( "Bypassing alternate pipe [{}] for branch point with order={}", alternatePipe, order); } return rslt; }  int getOrder(); void setOrder(int order); @Required void setPredicate(Predicate<HttpServletRequest> predicate); @Required void setAlternatePipe(IPortalRenderingPipeline alternatePipe); boolean renderStateIfApplicable(
            final HttpServletRequest request, final HttpServletResponse response); @Override String toString(); @Override int compareTo(RenderingPipelineBranchPoint branchPoint); }
RenderingPipelineBranchPoint implements Comparable<RenderingPipelineBranchPoint> { public boolean renderStateIfApplicable( final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final boolean rslt = predicate.test(request); if (rslt) { logger.debug( "Using alternate pipe [{}] for branch point with order={}", alternatePipe, order); alternatePipe.renderState(request, response); } else { logger.debug( "Bypassing alternate pipe [{}] for branch point with order={}", alternatePipe, order); } return rslt; }  int getOrder(); void setOrder(int order); @Required void setPredicate(Predicate<HttpServletRequest> predicate); @Required void setAlternatePipe(IPortalRenderingPipeline alternatePipe); boolean renderStateIfApplicable(
            final HttpServletRequest request, final HttpServletResponse response); @Override String toString(); @Override int compareTo(RenderingPipelineBranchPoint branchPoint);  }