### Question:
APICaseVariable extends ConsoleAPI<CaseVariableItem> implements APIHasSearch<CaseVariableItem>,
        APIHasUpdate<CaseVariableItem>, APIHasGet<CaseVariableItem> { @Override public ItemSearchResult<CaseVariableItem> runSearch(int page, int resultsByPage, String search, String orders, Map<String, String> filters, List<String> deploys, List<String> counters) { attributeChecker.checkSearchFilters(filters); long caseId = Long.valueOf(filters.get(CaseVariableItem.ATTRIBUTE_CASE_ID)); return ((CaseVariableDatastore) getDefaultDatastore()).findByCaseId(caseId, page, resultsByPage); }  @Override CaseVariableItem runUpdate(APIID id, Map<String, String> attributes); @Override ItemSearchResult<CaseVariableItem> runSearch(int page, int resultsByPage, String search, String orders,
            Map<String, String> filters, List<String> deploys, List<String> counters); @Override CaseVariableItem runGet(APIID id, List<String> deploys, List<String> counters); void setAttributeChecker(APICaseVariableAttributeChecker attributeChecker);  }### Answer:
@Test public void searchIsFilteredByCaseId() throws Exception { long expectedCaseId = 1L; Map<String, String> filters = buildCaseIdFilter(expectedCaseId); apiCaseVariable.runSearch(0, 10, null, null, filters, null, null); verify(datastore).findByCaseId(expectedCaseId, 0, 10); }