Const use in test classes (#4311)