BetweenCriteria extends ArithmeticCriteria { public List<Object> meets(CacheIndex cacheIndex) { return cacheIndex.between(value, upperBound); } BetweenCriteria(String attributeName, Object lowerBound, Object upperBound); List<Object> meets(CacheIndex cacheIndex);  }
@Test public void getCriterias() { BetweenCriteria betweenCriteria = new BetweenCriteria("a", lowerBound, upperBound); doReturn(result).when(cacheIndex).between(lowerBound, upperBound); List<Object> actualResult = betweenCriteria.meets(cacheIndex); verify(cacheIndex).between(lowerBound, upperBound); assertEquals(result, actualResult); }