public void registerStrategy(BatchingStrategy<?, ?, ?> strategy) {
    _strategies.add(strategy);
  }
@Test
  public void testExecuteBatchFailure() {
    RecordingStrategy<Integer, Integer, String> strategy =
        new RecordingStrategy<Integer, Integer, String>((key, promise) -> promise.done(String.valueOf(key)), key -> key % 2) {

      @Override
      public void executeBatch(Integer group, Batch<Integer, String> batch) {
        throw new RuntimeException();
      }

    };

    _batchingSupport.registerStrategy(strategy);

    Task<String> task = Task.par(strategy.batchable(0).recover(e -> "failed"), strategy.batchable(1).recover(e -> "failed"), strategy.batchable(2).recover(e -> "failed"))
        .map("concat", (s0, s1, s2) -> s0 + s1 + s2);

    String result = runAndWait("TestBatchingSupport.testExecuteBatchFailure", task);

    assertEquals(result, "failedfailedfailed");
    assertTrue(strategy.getClassifiedKeys().contains(0));
    assertTrue(strategy.getClassifiedKeys().contains(1));
    assertTrue(strategy.getClassifiedKeys().contains(2));
    assertEquals(strategy.getExecutedBatches().size(), 0);
    assertEquals(strategy.getExecutedSingletons().size(), 0);
  }