### Question:
Filter { public Filter condition(String name, Object value) { return condition(name, Operator.eq, value); } Filter(Class<?> clazz);  Filter(int perPage, int pageNo, Condition... conditions);  Filter();  Filter(Condition... conditions); Filter condition(String name, Object value); Filter condition(String name, Operator operator, Object value); Filter page(int pageNo, int perPage); Filter sortBy(String name, boolean asc); Filter sortBy(SortField sortField); Filter cacheable(boolean cacheable); Filter clone(boolean paginate); List<T> list(); long count(); void delete();  }### Answer:
@Test public void shouldAddConditionUsingNameValue() { Filter filter = new Filter(); filter.condition("testKey", "testValue"); assertEquals(filter.getConditions().size(), 1); assertEquals(filter.getConditions().get(0).getName(), "testKey"); assertEquals(filter.getConditions().get(0).getValue(), "testValue"); }
@Test public void shouldAddConditionUsingNameValueOperator() { Filter filter = new Filter(); filter.condition("testKey", Operator.eq, "testValue"); assertEquals(filter.getConditions().size(), 1); assertEquals(filter.getConditions().get(0).getName(), "testKey"); assertEquals(filter.getConditions().get(0).getOperator(), Operator.eq); assertEquals(filter.getConditions().get(0).getValue(), "testValue"); }