### Question:
CertificateUtil { public static TrustManager[] createTrustManagers(String brokerCertificate, String alias) throws GeneralSecurityException, IOException { TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("X509"); trustManagerFactory.init(createKeyStore(brokerCertificate, alias)); return trustManagerFactory.getTrustManagers(); } private  CertificateUtil(); static KeyManager[] createKeyManagers(String clientCertificate, String alias); static TrustManager[] createTrustAllTrustManagers(); static TrustManager[] createTrustManagers(String brokerCertificate, String alias); static KeyStore createKeyStore(String certificate, String alias); static String getMultilineCertificate(String certificate);  }### Answer:
@Test public void testCreateTrustManagers() throws Exception { final TrustManager[] trustManagers = CertificateUtil.createTrustManagers(TEST_CERT, "test-cert"); assertThat(trustManagers).isNotNull().isNotEmpty(); }