PollableTaskBlobStorage { public <T> T getInput(Long pollableTaskId, Class<T> clazz) { String inputName = getInputName(pollableTaskId); String inputJson = structuredBlobStorage.getString(POLLABLE_TASK, inputName) .orElseThrow(() -> new RuntimeException("Can't get the input json for: " + pollableTaskId)); T t = objectMapper.readValueUnchecked(inputJson, clazz); return t; }  void saveInput(Long pollableTaskId, Object input); void saveOutput(Long pollableTaskId, Object output); T getInput(Long pollableTaskId, Class<T> clazz); String getOutputJson(Long pollableTaskId); T getOutput(Long pollableTaskId, Class<T> clazz);  }
@Test public void missingInput() { long pollableId = 999999999999999999L; try { TestData input = pollableTaskBlobStorage.getInput(pollableId, TestData.class); fail(); } catch (RuntimeException e) { assertEquals("Can't get the input json for: " + pollableId, e.getMessage()); } }