Test refactor and enhancement

Refactored and cleaned up tests, modified to make them more reliable when executing from within a Java environment (such as IDE). 

Also simplified some test coverage redundancy.
So, we really can't accept SF copyrighted stuff into here.  We have an Apache license and even the test code has to be licensed as such.