### Question:
AlgorithmFinder { public String[] getAvailableAlgorithmFileNames(Class<?> algorithmSubclass) throws IOException, ClassNotFoundException { LinkedList<String> availableAlgorithms = new LinkedList<>(); String pathToFolder = ""; try { pathToFolder = Thread.currentThread().getContextClassLoader().getResource(Constants.ALGORITHMS_RESOURCE_NAME).getPath(); } catch (NullPointerException e) { return new String[]{}; } File[] jarFiles = retrieveJarFiles(pathToFolder); for (File jarFile : jarFiles) { if (algorithmSubclass == null || getAlgorithmInterfaces(jarFile).contains(algorithmSubclass)) { availableAlgorithms.add(jarFile.getName()); } } String[] stringArray = new String[availableAlgorithms.size()]; return availableAlgorithms.toArray(stringArray); }  String[] getAvailableAlgorithmFileNames(Class<?> algorithmSubclass); String getAlgorithmDirectory(); Set<Class<?>> getAlgorithmInterfaces(String algorithmJarFileName); Set<Class<?>> getAlgorithmInterfaces(File algorithmJarFile);  }### Answer:
@Test public void retrieveAllJarFiles() throws IOException, ClassNotFoundException { AlgorithmFinder algoFinder = new AlgorithmFinder(); String[] algos = algoFinder.getAvailableAlgorithmFileNames(null); assertTrue(algos.length > 0); }
@Test public void testRetrieveUniqueColumnCombinationJarFiles() throws IOException, ClassNotFoundException { AlgorithmFinder algoFinder = new AlgorithmFinder(); String[] algos = algoFinder.getAvailableAlgorithmFileNames(AlgorithmType.UCC.getAlgorithmClass()); assertEquals(4, algos.length); }