fix and test for JERSEY-2556