Refactored Substance.Test to allow subclassing.
Restructured tests.