Fixed JERSEY-1612 and added unit test.
Merge pull request #1 from cowwoc/JERSEY-1612

Fixed JERSEY-1612 and added unit test.