JAL-2110 unit tests for and minor refactoring of CrossRef