@Test
public void testGetCertificates() throws Exception {

  ListCertificatesController controller = new ListCertificatesController();
  String storeType = "jks";
  File storeFile = ctx.getResource("classpath:certs/localhost-truststore.jks").getFile();
  String storePassword = "123456";
  List<Cert> certs = controller.getCertificates(storeType, storeFile.toString(), storePassword);
  assertThat(certs).doesNotContainNull();
  assertThat(certs.size()).isEqualTo(2);
  assertThat(certs.get(0).getAlias()).isEqualTo("*.google.com");
  assertThat(certs.get(1).getAlias()).isEqualTo("google_g2_2017");
}