### Question:
ElasticsearchQuery implements SimpleQuery<ElasticsearchQuery<K>>, Fetchable<K> { @Override public long fetchCount() { Predicate filter = createFilter(queryMixin.getMetadata()); return client.prepareCount().setQuery(createQuery(filter)).execute().actionGet().getCount(); } ElasticsearchQuery(Client client, Function<SearchHit, K> transformer, ElasticsearchSerializer serializer); @Override CloseableIterator<K> iterate(); List<K> fetch(Path<?>... paths); @Override List<K> fetch(); K fetchFirst(Path<?>... paths); @Nullable @Override K fetchFirst(); K fetchOne(Path<?>... paths); @Nullable @Override K fetchOne(); QueryResults<K> fetchResults(Path<?>... paths); @Override QueryResults<K> fetchResults(); @Override long fetchCount(); @Override ElasticsearchQuery<K> limit(@Nonnegative long limit); @Override ElasticsearchQuery<K> offset(@Nonnegative long offset); @Override ElasticsearchQuery<K> restrict(QueryModifiers modifiers); @Override ElasticsearchQuery<K> orderBy(OrderSpecifier<?>... o); @Override ElasticsearchQuery<K> set(ParamExpression<T> param, T value); @Override ElasticsearchQuery<K> distinct(); @Override ElasticsearchQuery<K> where(Predicate... o); abstract String getIndex(); abstract String getType();  }### Answer:
@Test public void Count() { assertEquals(4, query().fetchCount()); }