modify test to demonstrate type cast error in extension
added common hierarchy for Block and Document