tests for PUT functionality

@ormsbee 
In general, please comment the major logic blocks of this method to indicate why you needed to do them.