EAGLESIX-2716 Filled out the test cases, refactored them a little.