Code added for POST request with end to end testing with database