SumOfTaxes { public double getFailedSum(int year, int month) { return taxCalculationRepository.getFailedSum(year, month).getAmount().doubleValue(); }  double getSuccessSum(int year, int month); double getFailedSum(int year, int month);  }
@Test public void testGetFailedSum() throws Exception { when(taxCalculationRepository.getFailedSum(TEST_YEAR, TEST_MONTH)).thenReturn(MONEY_100Euro); double failedSum = sumOfTaxes.getFailedSum(TEST_YEAR, TEST_MONTH); verify(taxCalculationRepository).getFailedSum(TEST_YEAR, TEST_MONTH); assertTrue(failedSum == MONEY_100Euro.getAmount().doubleValue()); }