Implemented doPost and some unit tests