Add tests for process_pending and correct zrem call