public static ReplaceAll replaceAll(String regex, String replacement) {
    return replaceAll(Pattern.compile(regex), replacement);
  }
@Test
  @Category(NeedsRunner.class)
  public void testReplaceAllMixed() {

    PCollection<String> output =
        p.apply(Create.of("abc", "xj", "yj", "zj", "def")).apply(Regex.replaceAll("[xyz]", "new"));

    PAssert.that(output).containsInAnyOrder("abc", "newj", "newj", "newj", "def");
    p.run();
  }