PipeStepPair { public static Builder named(String name) { return new Builder(name); } private  PipeStepPair(String name, Pattern pattern); static Builder named(String name); static String defaultToggleName(); static String defaultToggleOff(); static String defaultToggleOn(); FormatterStep in(); FormatterStep out();  }
@Test public void andApply() throws Exception { FormatterStep lowercase = FormatterStep.createNeverUpToDate("lowercase", str -> str.toLowerCase(Locale.ROOT)); FormatterStep lowercaseSometimes = PipeStepPair.named("lowercaseSometimes").openClose("<lower>", "</lower>") .buildStepWhichAppliesSubSteps(Paths.get(""), Arrays.asList(lowercase)); StepHarness.forSteps(lowercaseSometimes).test( StringPrinter.buildStringFromLines( "A B C", "<lower>", "D E F", "</lower>", "G H I"), StringPrinter.buildStringFromLines( "A B C", "<lower>", "d e f", "</lower>", "G H I")); }