### Question:
ElasticCountStatisticsProvider implements StatisticsProvider { @Override public Statistics.SummaryStatistics getNodeStatistics(EEntityBase item) { Plan plan = new Plan(new EntityOp(new AsgEBase<>(item))); return getSummaryStatistics(plan); } ElasticCountStatisticsProvider(PlanTraversalTranslator planTraversalTranslator, Ontology ontology, Provider<UniGraphProvider> uniGraphProvider, ElasticCountStatisticsConfig elasticCountStatisticsConfig); @Override Statistics.SummaryStatistics getNodeStatistics(EEntityBase item); @Override Statistics.SummaryStatistics getNodeFilterStatistics(EEntityBase item, EPropGroup entityFilter); @Override Statistics.SummaryStatistics getEdgeStatistics(Rel item, EEntityBase source); @Override Statistics.SummaryStatistics getEdgeFilterStatistics(Rel item, RelPropGroup entityFilter, EEntityBase source); @Override Statistics.SummaryStatistics getRedundantNodeStatistics(EEntityBase entity, RelPropGroup relPropGroup); @Override long getGlobalSelectivity(Rel rel, RelPropGroup filter, EBase entity, Direction direction);  }### Answer:
@Test public void testNodeStatistics() throws Exception { PlanTraversalTranslator planTraversalTranslator = Mockito.mock(PlanTraversalTranslator.class); Ontology ontology = Mockito.mock(Ontology.class); Provider<UniGraphProvider> uniGraphProvider = Mockito.mock(Provider.class); UniGraphProvider uniGraphProvider1 = Mockito.mock(UniGraphProvider.class); UniGraph uniGraph = Mockito.mock(UniGraph.class); GraphTraversalSource source = Mockito.mock(GraphTraversalSource.class); when(uniGraphProvider.get()).thenReturn(uniGraphProvider1); when(uniGraphProvider1.getGraph(any())).thenReturn(uniGraph); when(uniGraph.traversal()).thenReturn(source); GraphTraversal traversal = Mockito.mock(GraphTraversal.class); when(planTraversalTranslator.translate(any(), any())).thenReturn(traversal); when(traversal.count()).thenReturn(traversal); when(traversal.next()).thenReturn(1L); ElasticCountStatisticsConfig config = Mockito.mock(ElasticCountStatisticsConfig.class); ElasticCountStatisticsProvider provider = new ElasticCountStatisticsProvider(planTraversalTranslator, ontology, uniGraphProvider, config ); Statistics.SummaryStatistics nodeStatistics = provider.getNodeStatistics(new EConcrete()); Assert.assertEquals(1, nodeStatistics.getCardinality(), 0.0001); }