VoidDuplicateIdentifiers extends AbstractChore { @Override public void perform(PrintWriter output) { for (PatientIdentifierType type : Context.getPatientService().getAllPatientIdentifierTypes()) { voidDuplicatesOfType(type, output); } }  @Override void perform(PrintWriter output);  }
@Test public void perform() throws Exception { executeSql("UPDATE patient_identifier SET identifier = '6TS-4' WHERE patient_identifier_id = 5;"); executeSql("UPDATE patient_identifier SET preferred = 1, voided = 0 WHERE patient_identifier_id = 6;"); chore.perform(new PrintWriter(System.out)); Context.flushSession(); ValidateUtil.validate(TestUtils.getPatient(7)); ValidateUtil.validate(TestUtils.getPatient(8)); }