@Test public void saveRemovesExistingDataWhenPatientDataIsNullAndPolicyIsReplace() { when(this.patient.getData(this.component.getName())).thenReturn(null); this.component.save(this.patient, PatientWritePolicy.REPLACE); verify(this.doc, times(1)).getXObject(eq(Patient.CLASS_REFERENCE), eq(true), any()); verifyNoMoreInteractions(this.doc); verify(this.dataHolder, times(1)).setStringValue(FIRST_NAME, null); verify(this.dataHolder, times(1)).setStringValue(LAST_NAME, null); verifyNoMoreInteractions(this.dataHolder); }
@Override public String getName() { return "patientName"; }
PatientNameController extends AbstractSimpleController { @Override public String getName() { return "patientName"; } }
PatientNameController extends AbstractSimpleController { @Override public String getName() { return "patientName"; }  }
PatientNameController extends AbstractSimpleController { @Override public String getName() { return "patientName"; }  @Override String getName(); }
PatientNameController extends AbstractSimpleController { @Override public String getName() { return "patientName"; }  @Override String getName();  }