### Question:
ExecPipe { public static ExecPipe pipeOf(final boolean quoteArgs, final String[]... commands) { List<ExecBuilder> builders = new ArrayList<>(); for (String[] command : commands) { List<String> commandParts = Arrays.asList(command); ExecBuilder builder = new ExecBuilder(commandParts.get(0), quoteArgs); List<String> args = commandParts.subList(1, commandParts.size()); String[] argsArr = new String[args.size()]; builder.args(args.toArray(argsArr)); builders.add(builder); } return new ExecPipe(builders); } ExecPipe(final ExecBuilder... execBuilders);  ExecPipe(final List<ExecBuilder> execBuilders); AsynchronousExecResult exec(); static ExecPipe pipeOf(final boolean quoteArgs, final String[]... commands); @Override String toString();  }### Answer:
@Test public void testPipeOf() throws IOException, InterruptedException { AsynchronousExecResult result = ExecPipe.pipeOf(false, new String[][]{ {"echo", "test"}, {"grep", "te"}, {"wc", "-l"} }).exec(); result.waitFor(); Assert.assertTrue(result.isSuccessful()); Assert.assertEquals(result.getStdOutResult(), "1\n"); }