### Question:
NameToBeDefined implements Runnable { public NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors) { return retryOnError(delayMillis, 0, Collections.singletonList(errors)); } protected  NameToBeDefined(Runnable runnableToDecorate); static NameToBeDefined wrap(final Runnable runnableToDecorate); NameToBeDefined retryOnBusy(); NameToBeDefined retryOnBusy(final long delayMillis); NameToBeDefined retryOnBusy(final long... delayMillis); NameToBeDefined retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError error); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError... errors); NameToBeDefined runOnError(final Runnable runOnError, final List<EdsdkError> errors); @Override void run(); void handle(Consumer<Throwable> consumer); R handle(Function<Throwable, R> function);  }### Answer:
@Test void retryOnError() { countOnly.retryOnError(10, EdsdkError.EDS_ERR_DEVICE_BUSY) .run(); assertCounts(1, 0); countOnly.retryOnError(10, EdsdkError.EDS_ERR_DEVICE_BUSY, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(2, 0); countOnly.retryOnError(5, 2, EdsdkError.EDS_ERR_DEVICE_BUSY, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(3, 0); countOnly.retryOnError(5, 2, EdsdkError.EDS_ERR_DEVICE_DISK_ERROR) .run(); assertCounts(4, 0); }
@Test void retryOnErrorThrowsOnBadParams() { Assertions.assertThrows(IllegalArgumentException.class, () -> countOnly.retryOnError(-1, 4)); Assertions.assertThrows(IllegalArgumentException.class, () -> countOnly.retryOnError(1, -1)); Assertions.assertThrows(IllegalArgumentException.class, () -> countOnly.retryOnError(1, 1, Lists.newArrayList((EdsdkError) null))); assertCounts(0, 0); }