@Override
    public void upload(String path, InputStream payload, long payloadSize) {
        File file = new File(payloadDir, path);
        String filePath = file.getAbsolutePath();
        try {
            if (!file.exists() && file.createNewFile()) {
                LOGGER.debug("Created file: {}", filePath);
            }
            IOUtils.copy(payload, new FileOutputStream(file));
            LOGGER.debug("Written to {}", filePath);
        } catch (IOException e) {
            // just handle this exception here and return empty map so that test will fail in case
            // this exception is thrown
            LOGGER.error("Error writing to {}", filePath);
        } finally {
            try {
                if (payload != null) {
                    payload.close();
                }
            } catch (IOException e) {
                LOGGER.warn("Unable to close input stream when writing to file");
            }
        }
    }
A {@link ExternalPayloadStorage} implementation that stores payload in file.
test-harness/src/test/java/com/netflix/conductor/test/utils/MockExternalPayloadStorage.java