### Question:
FunctionSearchService implements LiveSearchService<String> { public FunctionDef getFunction(final String function) { return currentFunctions.get(function); } @Inject  FunctionSearchService(final ConditionEditorAvailableFunctionsService availableFunctionsService,
                                 final FunctionNamingService functionNamingService); void init(final ClientSession session); void reload(final String type,
                       final Command onSuccess); void clear(); @Override void search(final String pattern,
                       final int maxResults,
                       final LiveSearchCallback<String> callback); @Override void searchEntry(final String key,
                            final LiveSearchCallback<String> callback); FunctionDef getFunction(final String function);  }### Answer:
@Test public void voidTestGetFunctionWithResult() { loadTestFunctions(); FunctionDef functionDef = searchService.getFunction(FUNCTION1); assertEquals(testFunctions.get(0), functionDef); }
@Test public void voidTestGetFunctionWithoutResult() { FunctionDef functionDef = searchService.getFunction(FUNCTION1); assertNull(functionDef); loadTestFunctions(); functionDef = searchService.getFunction("SOME_OTHER_FUNCTION"); assertNull(functionDef); }