expand testing and add required fields for other methods

Broke out testing so each function gets its own file as the file was rather large and testing each component was getting out of hand.

Greatly expanded tests for each function. Also added checks and functionality for missing required params
I'm not sure I like the style of these line returns. Maybe use a variable for the code string so we can fit the assertion in a better visual style.