/**
   * Test method for {@link
   * BasicProcessProvider#execute(com.asakusafw.windgate.core.resource.DriverFactory,
   * ProcessScript)}.
   *
   * @throws IOException expected
   */
  @Test(expected = IOException.class)
  public void execute_invalid_drain() throws IOException {
    MockDriverFactory factory = new MockDriverFactory();
    MockSourceDriver<String> source =
        factory.add("testing", new MockSourceDriver<String>("source"));
    ProcessScript<String> script =
        new ProcessScript<>("testing", "plain", String.class, driver("source"), driver("drain"));

    List<String> data = Arrays.asList("Hello", "world", "!");
    source.setIterable(data);
    provider.execute(factory, script);
  }
  /**
   * Test method for {@link
   * BasicProcessProvider#execute(com.asakusafw.windgate.core.resource.DriverFactory,
   * ProcessScript)}.
   *
   * @throws IOException if failed
   */
  @Test
  public void execute() throws IOException {
    MockDriverFactory factory = new MockDriverFactory();
    MockSourceDriver<String> source =
        factory.add("testing", new MockSourceDriver<String>("source"));
    MockDrainDriver<String> drain = factory.add("testing", new MockDrainDriver<String>("drain"));
    ProcessScript<String> script =
        new ProcessScript<>("testing", "plain", String.class, driver("source"), driver("drain"));

    List<String> data = Arrays.asList("Hello", "world", "!");
    source.setIterable(data);
    provider.execute(factory, script);

    assertThat(drain.getResults(), is(data));
  }