fixes #4926 - systems test and rubocop cleanup

+ Adding an example systems test, including calls to api to check results.
+ Some rubocop cleanup in systems.rb