JsonArray<RecoveredPayload> recoveredPayloads = JsonCollections.createArray();
for (int i = nextExpectedVersion; i < nextExpectedVersion + payloadCount; i++) {
recoveredPayloads.add(new StubRecoveredPayload(i, PAYLOADS.get(i)));
}
callback.onPayloadsRecovered(recoveredPayloads, nextExpectedVersion);
return null;
}
});
}
}