### Question:
UpdaterUtil { public static Set<CertificatePair> buildCertificatePairs(String certificateDirectory, String firstCertificatePrefix, String secondCertificatePrefix, String certificateSuffix) throws IOException, CertificateException { return certificatePairs; } private  UpdaterUtil(); static void init(boolean useDebugCerts); static Set<CertificatePair> buildCertificatePairs(String certificateDirectory, String firstCertificatePrefix,
                                                             String secondCertificatePrefix, String certificateSuffix); static Set<Certificate> readCertificates(Set<Path> certificateFilesPaths); static Certificate readCertificate(String certificateFileName); static Certificate readCertificate(Path certificatePath); static String getStringRepresentation(Certificate cert); static Set<Certificate> readCertificates(String directory, String prefix, String suffix); static Set<Certificate> readCertificates(String directory, String suffix, String... prefixes); static Set<Path> findFiles(Path directory, String prefix, String suffix); static Set<Path> findFiles(String directory, String suffix, String... prefixes); static DoubleByteArrayTuple split(byte[] arr); static Stream<Path> walk(String path); static URL getResource(String resource); static byte[] concatArrays(byte[] arr1, byte[] arr2);  }### Answer:
@Test public void testBuildCertificatePairs() throws Exception { String directory = "test-dir"; String[] files = new String[]{"1_1.crt", "1_2.crt", "1_3.crt", "2_1.crt", "2_2.crt"}; Path directoryPath = Paths.get(directory); createCertificateMocksForFiles(certificateFactoryMock, files); Set<CertificatePair> result = UpdaterUtil.buildCertificatePairs(directory, "1_", "2_", ".crt"); assertNotNull(result); for (CertificatePair pair : result) { log.debug("pair: [{}, {}]", pair.getFirstCertificate().toString(), pair.getSecondCertificate().toString()); } assertEquals(result.size(), 6); assertTrue(containsPair(result, "2_1.crt", "1_1.crt")); assertTrue(containsPair(result, "2_1.crt", "1_2.crt")); assertTrue(containsPair(result, "2_1.crt", "1_3.crt")); assertTrue(containsPair(result, "2_2.crt", "1_1.crt")); assertTrue(containsPair(result, "2_2.crt", "1_2.crt")); assertTrue(containsPair(result, "2_2.crt", "1_3.crt")); }