LMSEstimator { public long estimate(Filter filter) { long estimatedEntryCount = 0; for (int i = 0; i < 5; i++) { estimatedEntryCount += weights[i] * getInput(filter, i); } if (Double.isInfinite(estimatedEntryCount) || Double.isNaN(estimatedEntryCount)) { estimatedEntryCount = 1; weights = new double[5]; } return Math.max(0, estimatedEntryCount); } private  LMSEstimator(double alpha, double[] weights, long threshold);  LMSEstimator(); synchronized void update(Filter filter, long numFound); long estimate(Filter filter);  }
@Test public void testEstimate() throws Exception { LMSEstimator lmsEstimator = new LMSEstimator(); Filter filter = mock(Filter.class); long estimate = lmsEstimator.estimate(filter); assertEquals(0L, estimate); }