PumbaCommandLineCreator { public static Collection<String> run(String chaosCommand, boolean random, CubeDockerConfiguration cubeDockerConfiguration) { String[] runningCommand = new String[8]; runningCommand[PUMBA_INDEX] = "pumba"; runningCommand[RUN_INDEX] = "run"; runningCommand[CHAOS_INDEX] = "--chaos"; if (random) { runningCommand[RANDOM_INDEX] = "--random"; } if (!isNativeDocker(cubeDockerConfiguration)) { runningCommand[HOST_INDEX] = "--host"; runningCommand[IP_INDEX] = cubeDockerConfiguration.getDockerServerUri(); runningCommand[TLS_INDEX] = "--tlsverify"; } runningCommand[CHAOS_COMMAND_INDEX] = chaosCommand; return createCommandLine(runningCommand); } private  PumbaCommandLineCreator(); static Collection<String> run(String chaosCommand, boolean random,
        CubeDockerConfiguration cubeDockerConfiguration);  }
@Test public void shouldCreatePumbaCli() { when(cubeDockerConfiguration.getDockerServerUri()).thenReturn("https: final Collection<String> cli = PumbaCommandLineCreator.run("re2:^hp|10s|KILL:SIGTERM", false, cubeDockerConfiguration); assertThat(cli).containsExactly("pumba", "--host", "https: "re2:^hp|10s|KILL:SIGTERM"); }
@Test public void shouldCreatePumbaCliWithRandom() { when(cubeDockerConfiguration.getDockerServerUri()).thenReturn("https: final Collection<String> cli = PumbaCommandLineCreator.run("re2:^hp|10s|KILL:SIGTERM", true, cubeDockerConfiguration); assertThat(cli).containsExactly("pumba", "--host", "https: "--chaos", "re2:^hp|10s|KILL:SIGTERM"); }