@Test public void should_change_persons_country_before_sending_data_through_ws() { systemUnderTest.transferTaxFor(new Person("Lewandowski", "UK")); verify(taxService).transferTaxFor(personCaptor.capture()); then(personCaptor.getValue()).hasName("Lewandowski").hasCountry("Poland"); }
public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(makePersonPolish(person)); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(makePersonPolish(person)); } }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(makePersonPolish(person)); } TaxTransferer(TaxService taxService); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(makePersonPolish(person)); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(makePersonPolish(person)); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person);  }