@Test
public void getTotalAmountOfPaidTaxes() throws Exception {

    Employee employee = new EmployeeTestBuilder().build();
    when(monthlyTaxForEmployeeRepository.findByEmployee(employee)).thenReturn(
            Arrays.asList(
                    new MonthlyTaxForEmployeeTestBuilder().withHasError(false).withTax(10.0).build(),
                    new MonthlyTaxForEmployeeTestBuilder().withHasError(false).withTax(10.0).build(),
                    new MonthlyTaxForEmployeeTestBuilder().withHasError(true).withTax(10.0).build()
            )
    );
    Money totalAmountOfPaidTaxes = employeeService.getTotalAmountOfPaidTaxes(employee);
    assertThat(totalAmountOfPaidTaxes).isEqualTo(Money.of(CurrencyUnit.EUR, 20.0));
}