should substitute in jersey but will not. but unit test works