Was not able to find a way to write an automated test for this without causing the processor itself to be restarted. So tested via the following manual process:
Load up the example flows per the CONTRIBUTING file.
Start the "Put Text" flow (after first setting the "Restart" property to "true").
Tail the NiFi log file to see "success" messages.
Stop MarkLogic via Docker.
See the "failure" messages being logged.
Start MarkLogic via Docker.
See PutMarkLogic able to restart its WriteBatcher successfully and start logging "success" messages again.
Was not able to find a way to write an automated test for this without causing the processor itself to be restarted. So tested via the following manual process: