I think the CNPJValidatorTest is an example, but only for Mod11.

I didn't recheck the validation of check digit position, I keept the one created by @hferentschik, I think the check need to be before the first or after the last