Removed duplicate test code.

Added validations to make the deduplicated tests pass.
Removed duplicate validation code. Not happy with the generics, but it's good enough until I can figure out how to make it go.