Adapt testValidateDnsNames for klint compliance

Modified testValidateDnsNames() to adhere to the latest klint linting
rules.

Test: TH
Change-Id: I3d8a8b282216c494c3602a671f906709031216f4
1 file changed