Add unit tests. One failing until I add circular batching logic.