EMR { public int storeAuditLog(AuditLogRecord auditLogRecord) { PreparedStatementData psd = new PreparedStatementData(5); psd.setQueryStr(INSERT_AUDIT_LOG); psd.addParameter(0, PreparedStatementData.ParameterType.STRING, auditLogRecord.getPatientId()); psd.addParameter(1, PreparedStatementData.ParameterType.STRING, auditLogRecord.getProvider()); psd.addParameter(2, PreparedStatementData.ParameterType.STRING, auditLogRecord.getProviderType()); psd.addParameter(3, PreparedStatementData.ParameterType.TIMESTAMP, Timestamp.from(auditLogRecord.getAccessTime().toInstant())); psd.addParameter(4, PreparedStatementData.ParameterType.STRING, auditLogRecord.getLocation()); try { return DBUtil.doUpdate(psd, dataSource); } catch (SQLException e) { throw new RuntimeException(e); } } EMR(); List<Appointment> getPatientAppointments(String patientId); Patient getPatient(String patientId); Provider getProvider(String providerId); int storeAuditLog(AuditLogRecord auditLogRecord);  }
@Test public void storeAuditLog() { AuditLogRecord alr = new AuditLogRecord(); alr.setPatientId("3"); alr.setProvider("provider00053"); alr.setProviderType(emr.getProvider("provider00053").getProviderType()); alr.setAccessTime(new Date()); alr.setLocation("102"); Assert.assertEquals(emr.storeAuditLog(alr), 1); }