public static Split split(String regex) {
    return split(Pattern.compile(regex), false);
  }
@Test
  @Category(NeedsRunner.class)
  public void testSplitsWithEmpty() {

    PCollection<String> output =
        p.apply(Create.of("The  quick   brown fox jumps over    the lazy dog"))
            .apply(Regex.split("\\s", true));

    PAssert.that(output)
        .containsInAnyOrder(
            "The", "", "quick", "brown", "", "", "fox", "jumps", "over", "", "", "", "the", "lazy",
            "dog");
    p.run();
  }