Added tests to cover JERSEY-1554.

Change-Id: Ia180ded0613b4e201518f9039eca6ac2b94be4df
Signed-off-by: Marek Potociar <marek.potociar@oracle.com>