unit test for post and setBody method