@Test public void checksChinaDigiCertCertificatesPins() throws Exception { CertificatePinnerFactory certificatePinnerFactory = new CertificatePinnerFactory(); Map<String, List<String>> chinaCertificatesPins = certificatePinnerFactory .provideCertificatesPinsFor(Environment.CHINA); assertTrue(chinaCertificatesPins.containsKey("events.mapbox.cn")); List<String> stagingPins = chinaCertificatesPins.get("events.mapbox.cn"); assertTrue(stagingPins.contains("gakY+fylqW6kp6piqnaQNLZFzT8HlhzP5lsGJk5WguE=")); assertTrue(stagingPins.contains("5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w=")); assertTrue(stagingPins.contains("r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=")); }
Map<String, List<String>> provideCertificatesPinsFor(Environment environment) { return CERTIFICATES_PINS.get(environment); }
CertificatePinnerFactory { Map<String, List<String>> provideCertificatesPinsFor(Environment environment) { return CERTIFICATES_PINS.get(environment); } }
CertificatePinnerFactory { Map<String, List<String>> provideCertificatesPinsFor(Environment environment) { return CERTIFICATES_PINS.get(environment); }  }
CertificatePinnerFactory { Map<String, List<String>> provideCertificatesPinsFor(Environment environment) { return CERTIFICATES_PINS.get(environment); }   }
CertificatePinnerFactory { Map<String, List<String>> provideCertificatesPinsFor(Environment environment) { return CERTIFICATES_PINS.get(environment); }    }