@Test
public void forwardedBeforeWithCompleteInput() throws IOException {

    SecurityAnalysisExecutionInput input = new SecurityAnalysisExecutionInput()
            .setParameters(new SecurityAnalysisParameters())
            .setNetworkVariant(EurostagTutorialExample1Factory.create(), VariantManagerConstants.INITIAL_VARIANT_ID)
            .setContingenciesSource(ByteSource.wrap("contingencies definition".getBytes(StandardCharsets.UTF_8)))
            .addResultExtensions(ImmutableList.of("ext1", "ext2"))
            .addViolationTypes(ImmutableList.of(LimitViolationType.CURRENT));
    ExecutionHandler<SecurityAnalysisResult> handler = SecurityAnalysisExecutionHandlers.forwarded(input, 12);
    Path workingDir = fileSystem.getPath("/work");
    List<CommandExecution> commandExecutions = handler.before(workingDir);
    SimpleCommand command = (SimpleCommand) commandExecutions.get(0).getCommand();
    List<String> args = command.getArgs(0);
    assertThat(args.subList(1, args.size()))
            .containsExactlyInAnyOrder("--case-file=/work/network.xiidm",
                    "--parameters-file=/work/parameters.json",
                    "--output-file=/work/result.json",
                    "--output-format=JSON",
                    "--contingencies-file=/work/contingencies.groovy",
                    "--with-extensions=ext1,ext2",
                    "--limit-types=CURRENT",
                    "--task-count=12");
    assertThat(workingDir.resolve("network.xiidm")).exists();
    assertThat(workingDir.resolve("parameters.json")).exists();
    assertThat(workingDir.resolve("contingencies.groovy")).exists();
}