EMR { public Provider getProvider(String providerId) { if(providerCache.containsKey(providerId)) { return providerCache.get(providerId); } PreparedStatementData psd = new PreparedStatementData(1); psd.setQueryStr(GET_PROVIDER); psd.addParameter(0, PreparedStatementData.ParameterType.STRING, providerId); try { String[][] rs = DBUtil.doQuery(psd, dataSource); if (rs == null || rs.length == 0) { return null; } else { for (String[] r : rs) { Provider provider = new Provider(); provider.setProviderId(r[0]); provider.setFirstName(r[1]); provider.setLastName(r[2]); provider.setSsn(r[3]); provider.setDob(Date.valueOf(r[4])); provider.setSex(r[5]); provider.setProviderType(r[6]); provider.setCredentials(r[7]); provider.setLicense(r[8]); provider.setLastLogin(Timestamp.valueOf(r[9])); provider.setLastLoginLocation(r[10]); providerCache.put(providerId, provider); return provider; } } } catch (SQLException e) { throw new RuntimeException(e); } return null; } EMR(); List<Appointment> getPatientAppointments(String patientId); Patient getPatient(String patientId); Provider getProvider(String providerId); int storeAuditLog(AuditLogRecord auditLogRecord);  }
@Test public void getProvider() { Provider provider = emr.getProvider("provider00053"); Assert.assertNotNull(provider); System.out.println(provider.getFirstName()); System.out.println(provider.getLastName()); System.out.println(provider.getDob()); System.out.println(provider.getLastLogin()); }