### Question:
FunctionRegistryHolder { public ListMultimap<String, DrillFuncHolder> getAllFunctionsWithHolders(AtomicLong version) { try (AutoCloseableLock lock = readLock.open()) { if (version != null) { version.set(this.version); } ListMultimap<String, DrillFuncHolder> functionsWithHolders = ArrayListMultimap.create(); for (Map.Entry<String, Map<String, DrillFuncHolder>> function : functions.entrySet()) { functionsWithHolders.putAll(function.getKey(), Lists.newArrayList(function.getValue().values())); } return functionsWithHolders; } } FunctionRegistryHolder(); long getVersion(); void addJars(Map<String, List<FunctionHolder>> newJars, long version); void removeJar(String jarName); List<String> getAllJarNames(); List<String> getFunctionNamesByJar(String jarName); ListMultimap<String, DrillFuncHolder> getAllFunctionsWithHolders(AtomicLong version); ListMultimap<String, DrillFuncHolder> getAllFunctionsWithHolders(); ListMultimap<String, String> getAllFunctionsWithSignatures(); List<DrillFuncHolder> getHoldersByFunctionName(String functionName, AtomicLong version); List<DrillFuncHolder> getHoldersByFunctionName(String functionName); boolean containsJar(String jarName); int functionsSize(); String getJarNameByFunctionSignature(String functionName, String functionSignature);  }### Answer:
@Test public void testGetAllFunctionsWithHolders() { ListMultimap<String, DrillFuncHolder> expectedResult = ArrayListMultimap.create(); for (List<FunctionHolder> functionHolders : newJars.values()) { for(FunctionHolder functionHolder : functionHolders) { expectedResult.put(functionHolder.getName(), functionHolder.getHolder()); } } compareListMultimaps(expectedResult, registryHolder.getAllFunctionsWithHolders()); }