BZ1147099: Rule Templates: Unable to define in default package and import class. More tests.

(cherry picked from commit 1ac577f705613d6b620a3de391cae249eea42a28)