@Test public void should_not_call_web_service_method_if_person_is_null() { systemUnderTest.transferTaxFor(null); verify(taxService, never()).transferTaxFor(any(Person.class)); }
public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(person); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(person); } }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person);  }