### Question:
VariableSearchService implements LiveSearchService<String> { public String getOptionType(String key) { return optionType.get(key); } @Inject  VariableSearchService(final ConditionEditorMetadataService metadataService,
                                 final ClientTranslationService translationService); void init(ClientSession session); @Override void search(String pattern, int maxResults, LiveSearchCallback<String> callback); @Override void searchEntry(String key, LiveSearchCallback<String> callback); String getOptionType(String key); void clear();  }### Answer:
@Test public void testGetOptionTypeWithResults() { prepareAndInitSession(); List<Pair<String, String>> checkedVariables = buildExpectedVariableNames(MULTIPLE_INSTANCE_SUBPROCESS, 17); checkedVariables.forEach(variable -> assertEquals("Option type wasn't properly calculated for variable: " + variable, mockedVariableTypes.get(variable.getK1()), searchService.getOptionType(variable.getK1()))); }
@Test public void testGetOptionTypeWithoutResults() { prepareAndInitSession(); prepareAndInitSession(); List<String> checkedVariables = Arrays.asList("not-existing1", "not-existing2", "not-existing3", "and_so_on"); checkedVariables.forEach(checkedVariable -> { String type = searchService.getOptionType(checkedVariable); assertNotEquals(mockedVariableTypes, type); }); }