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