safter testing of inheritable class methods with anonymous classes