adapting test to post as json format