public void testViewNonExistantRecords() {
    action = new ViewMyRecordsAction(evil, 0l);
    try {
      action.getFamilyHistory();
    } catch (iTrustException e) {
      assertEquals(
          "A database exception has occurred. Please see the log in the console for stacktrace",
          e.getMessage());
    }

    try {
      action.getFamily();
    } catch (iTrustException e) {
      assertEquals(
          "A database exception has occurred. Please see the log in the console for stacktrace",
          e.getMessage());
    }
  }
 public void testViewMyRecords() throws Exception {
   assertEquals(pid, action.getPatient().getMID());
   assertEquals(2, action.getAllergies().size());
   assertEquals(9, action.getFamily().size());
   assertEquals(2, action.getAllHealthRecords().size());
   assertEquals(9, action.getAllOfficeVisits().size());
   assertEquals(6, action.getRepresented().size());
   assertEquals(0, action.getRepresenting().size());
   assertTrue(action.isSurveyCompleted(952));
   assertEquals(1, action.getLabs().size());
   action.representPatient("1");
   assertEquals(1L, action.getPatient().getMID());
   assertTrue(action.doesFamilyMemberHaveHighBP(fmBean));
   assertTrue(action.doesFamilyMemberHaveDiabetes(fmBean));
   assertTrue(action.isFamilyMemberSmoker(fmBean));
   assertFalse(action.doesFamilyMemberHaveCancer(fmBean));
   assertFalse(action.doesFamilyMemberHaveHighCholesterol(fmBean));
   assertFalse(action.doesFamilyMemberHaveHeartDisease(fmBean));
   assertTrue(action.getFamilyMemberCOD(fmBean).contains("Diabetes"));
   assertEquals(5, new ViewMyRecordsAction(factory, 5L).getFamilyHistory().size());
 }
  public void testGetFamily() throws iTrustException {
    List<FamilyMemberBean> fmbList = action.getFamily();

    assertEquals(9, fmbList.size());
  }