public static InMemorySorter create(Options options) {
    return new InMemorySorter(options);
  }
@Test
  public void testOutOfSpace() throws Exception {
    thrown.expect(IllegalStateException.class);
    thrown.expectMessage(is("No space remaining for in memory sorting"));
    SorterTestUtils.testRandom(
        () -> {
          InMemorySorter.Options options = new InMemorySorter.Options();
          options.setMemoryMB(1);
          return InMemorySorter.create(options);
        },
        1,
        10000000);
  }