### Question:
APICaseVariableAttributeChecker { public void checkSearchFilters(Map<String, String> filters) { if (filters == null || !filters.containsKey(CaseVariableItem.ATTRIBUTE_CASE_ID)) { throw new APIException(format("Filter '%s' must be specified", CaseVariableItem.ATTRIBUTE_CASE_ID)); } }  void checkUpdateAttributes(Map<String, String> attributes); void checkSearchFilters(Map<String, String> filters);  }### Answer:
@Test public void checkSearchFiltersPassForSuitableValues() throws Exception { Map<String, String> filters = buildSuitableSearchFilters(); attributeChecker.checkSearchFilters(filters); }
@Test(expected = APIException.class) public void checkSearchFiltersCheckForCaseIdFilters() throws Exception { Map<String, String> filters = buildSuitableSearchFilters(); filters.remove(CaseVariableItem.ATTRIBUTE_CASE_ID); attributeChecker.checkSearchFilters(filters); }
@Test(expected = APIException.class) public void should_throw_exception_when_filters_are_null() throws Exception { attributeChecker.checkSearchFilters(null); }