LinuxArgumentConverter implements Converter<String, String> { @NotNull @Override public String convert(@NotNull final String arg) { return "$'" + arg.replace("\\", "\\\\").replace("'", "\\'") + "'"; }  @NotNull @Override String convert(@NotNull final String arg);  }
@Test(dataProvider = "convertCases") public void shouldConvert(@NotNull final String arg, @NotNull final String expectedConvertedArf) { final Converter<String, String> instance = createInstance(); final String actualConvertedArf = instance.convert(arg); then(actualConvertedArf ).isEqualTo(expectedConvertedArf); }