PipelineConvention { public static String getPipelinesForPath(String path, String pipelineName) { ArrayList list = getPipelineListForPath(path, pipelineName); return StringUtils.join(list.iterator(),"|"); }  static String getPipelinesForPath(String path, String pipelineName); static ArrayList getPipelineListForPath(String path,String pipelineName);  }
@Test public void getPipelinesForPath() { String path = ""; String pipelineName = "_layout_.vm"; String result = PipelineConvention.getPipelinesForPath("/user/blog/sex/",pipelineName); assertEquals("/user/blog/sex/_layout_.vm|/user/blog/_layout_.vm|/user/_layout_.vm|/_layout_.vm",result); result = PipelineConvention.getPipelinesForPath("/user/blog/abc.name",pipelineName); assertEquals("/user/blog/_layout_.vm|/user/_layout_.vm|/_layout_.vm",result); result = PipelineConvention.getPipelinesForPath("user/blog/abc.name",pipelineName); assertEquals("user/blog/_layout_.vm|user/_layout_.vm|_layout_.vm",result); result = PipelineConvention.getPipelinesForPath("\\user\\blog\\abc.name",pipelineName); assertEquals("/user/blog/_layout_.vm|/user/_layout_.vm|/_layout_.vm",result); }