### Question:
AlgorithmFinder { public Set<Class<?>> getAlgorithmInterfaces(String algorithmJarFileName) throws IOException, ClassNotFoundException { String jarFilePath = ""; try { jarFilePath = Thread.currentThread().getContextClassLoader().getResource(Constants.ALGORITHMS_RESOURCE_NAME + Constants.FILE_SEPARATOR + algorithmJarFileName).getFile(); } catch (NullPointerException e) { return new HashSet<>(); } File file = new File(URLDecoder.decode(jarFilePath, Constants.FILE_ENCODING)); return getAlgorithmInterfaces(file); }  String[] getAvailableAlgorithmFileNames(Class<?> algorithmSubclass); String getAlgorithmDirectory(); Set<Class<?>> getAlgorithmInterfaces(String algorithmJarFileName); Set<Class<?>> getAlgorithmInterfaces(File algorithmJarFile);  }### Answer:
@Test public void getAlgorithmType() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException { String jarFilePath = Thread.currentThread().getContextClassLoader() .getResource("algorithms/example_ucc_algorithm.jar").getFile(); File file = new File(URLDecoder.decode(jarFilePath, Constants.FILE_ENCODING)); Set<Class<?>> algorithmInterfaces = new AlgorithmFinder().getAlgorithmInterfaces(file); assertNotNull(algorithmInterfaces); assertNotEquals(0, algorithmInterfaces.size()); assertTrue(algorithmInterfaces.contains(AlgorithmType.UCC.getAlgorithmClass())); }
@Test public void getAlgorithmTypeByFileName() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException { Set<Class<?>> algorithmInterfaces = new AlgorithmFinder().getAlgorithmInterfaces("example_ucc_algorithm.jar"); assertNotNull(algorithmInterfaces); assertNotEquals(0, algorithmInterfaces.size()); assertTrue(algorithmInterfaces.contains(AlgorithmType.UCC.getAlgorithmClass())); }