Added further support for generics

Used Guava's TypeToken in DocumentValidationTest to infer all needed
dependencies rather than require subclasses to inject them.