public int maxAllowedPlanningFailures() {
    return maxAllowedPlanningFailures;
  }
@Test
  void testMaxAllowedPlanningFailures() {
    ScanContext context = ScanContext.builder().maxAllowedPlanningFailures(-2).build();
    assertException(
        context, "Cannot set maxAllowedPlanningFailures to a negative number other than -1.");
  }