DefaultHostnameVerifier implements HostnameVerifier, CertificateHostnameVerifier { @Override public boolean verify(final String hostname, final SSLSession session) { return verifier.verify(hostname, session); }  @Override boolean verify(final String hostname, final SSLSession session); @Override boolean verify(final String hostname, final X509Certificate cert);  }
@Test(groups = "ssl", dataProvider = "certificates") public void verifyDefault(final String hostname, final X509Certificate cert, final boolean pass) throws Exception { Assert.assertEquals(DEFAULT_VERIFIER.verify(hostname, cert), pass); }
@Test(groups = "ssl", dataProvider = "certificates") public void verifySun(final String hostname, final X509Certificate cert, final boolean pass) throws Exception { Assert.assertEquals(SUN_VERIFIER.verify(hostname, cert), pass); }