Testing Inheritance patterns in Javascript