  @Test
  public void testStatsEstimateMean() {

    Money lowCpc = new Money();
    lowCpc.setMicroAmount(1_000_000L);
    Money lowTotal = new Money();
    lowTotal.setMicroAmount(10_000_000L);
    StatsEstimate lowEstimate = new StatsEstimate(lowCpc, 3.0, 0.01, 1000.0F, 100_000.0F, lowTotal);

    Money highCpc = new Money();
    highCpc.setMicroAmount(9_000_000L);
    Money highTotal = new Money();
    highTotal.setMicroAmount(90_000_000L);
    StatsEstimate highEstimate =
        new StatsEstimate(highCpc, 7.0, 0.09, 9000.0F, 900_000.0F, highTotal);
    StatsEstimate estimate = KeywordOptimizerUtil.calculateMean(lowEstimate, highEstimate);
    assertEquals(
        "Expected average CPC", 5_000_000L, estimate.getAverageCpc().getMicroAmount().longValue());
    assertEquals("Expected average position", 5.0, estimate.getAveragePosition(), DOUBLE_ERROR);
    assertEquals("Expected average click rate", 0.05, estimate.getClickThroughRate(), DOUBLE_ERROR);
    assertEquals("Expected clicks per day", 5000.0F, estimate.getClicksPerDay(), DOUBLE_ERROR);
    assertEquals("Expected impressions", 500_000.0F, estimate.getImpressionsPerDay(), DOUBLE_ERROR);
    assertEquals(
        "Expected total cost", 50_000_000L, estimate.getTotalCost().getMicroAmount().longValue());
  }