[BZ-1082527] Remove System.out.println from TraitFieldsAndLegacyClassesTest
(cherry picked from commit 13b595e847fa6d88c0dad34b34f4a9d0978126ce)