Query { public void addCriteria(final List<Criterion> criteria) { this.criteria.addAll(criteria); }  void setQueryHint(final String queryHint); String getQueryHint(); int getPageSize(); void setPageSize(final int pageSize); int getPageNum(); void setPageNum(final int pageNum); QueryMode getQueryMode(); void setQueryMode(final QueryMode queryMode); void addCriterion(final Criterion criterion); void addCriteria(final List<Criterion> criteria); List<Criterion> getCriteria(); Criterion getCriterion(final String pojoProperty); @Deprecated(forRemoval = true, since = "v2.8.10") void setCriteria(final List<Criterion> criteria);  }
@Test public void testAddCriteria() { final String key = "pojo"; final Criterion expected = Mockito.mock(Criterion.class); Mockito.when(expected.getPojoProperty()).thenReturn(key); query.addCriterion(expected); assertEquals(expected, query.getCriterion(key)); }