@Test public void execute() { doReturn(criteria).when(query).getCriteria(); doReturn(new ArrayList<Object>()).when(handler).execute(criteria); handler.execute(query); verify(handler).execute(criteria); }
@SuppressWarnings("unchecked") public List<K> execute(final Query query) { List<Object> results = execute(query.getCriteria()); return (List<K>) results; }
DefaultIndexHandler implements IndexHandler<K, V> { @SuppressWarnings("unchecked") public List<K> execute(final Query query) { List<Object> results = execute(query.getCriteria()); return (List<K>) results; } }
DefaultIndexHandler implements IndexHandler<K, V> { @SuppressWarnings("unchecked") public List<K> execute(final Query query) { List<Object> results = execute(query.getCriteria()); return (List<K>) results; } DefaultIndexHandler(); }
DefaultIndexHandler implements IndexHandler<K, V> { @SuppressWarnings("unchecked") public List<K> execute(final Query query) { List<Object> results = execute(query.getCriteria()); return (List<K>) results; } DefaultIndexHandler(); void addIndex(final String attributeName, final IndexType type); void add(final K key, final V value); void remove(final K key, final V value); void clear(); @SuppressWarnings("unchecked") List<K> execute(final Query query); }
DefaultIndexHandler implements IndexHandler<K, V> { @SuppressWarnings("unchecked") public List<K> execute(final Query query) { List<Object> results = execute(query.getCriteria()); return (List<K>) results; } DefaultIndexHandler(); void addIndex(final String attributeName, final IndexType type); void add(final K key, final V value); void remove(final K key, final V value); void clear(); @SuppressWarnings("unchecked") List<K> execute(final Query query);  }