@Test public void should_only_send_error_report_if_person_is_null_in_an_ugly_way() throws Exception { systemUnderTest.transferTaxFor(null); verify(taxService).sendErrorReport(); verifyNoMoreInteractions(taxService); }
public void transferTaxFor(Person person) { if (person == null) { taxService.sendErrorReport(); return; } taxService.transferTaxFor(person); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { taxService.sendErrorReport(); return; } taxService.transferTaxFor(person); } }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { taxService.sendErrorReport(); return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { taxService.sendErrorReport(); return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person); }
TaxTransferer { public void transferTaxFor(Person person) { if (person == null) { taxService.sendErrorReport(); return; } taxService.transferTaxFor(person); } TaxTransferer(TaxService taxService); void transferTaxFor(Person person);  }