Refactored endpoint field.
refactored tests because endpoint field was changed from String to URL
new builds