Add overriding tests

Review by @odersky