/** testRemoveWard2 */
  public void testRemoveWard2() {
    try {
      assertNotNull(wd1.removeWard(1L, 1L));
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.removeWard(1L, 1L);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testUpdateWardRoom */
  public void testUpdateWardRoom() {
    WardRoomBean wb = new WardRoomBean(0, 0, 0, "name1", "status");
    try {
      assertEquals(0, wd1.updateWardRoom(wb));
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.updateWardRoom(wb);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testAssignHCPToWard */
  public void testAssignHCPToWard() {
    try {
      assertTrue(wd1.assignHCPToWard(1L, 1L));
    } catch (DBException e) {
      // TODO
    } catch (ITrustException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.assignHCPToWard(1L, 1L);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testgetAllWardsByHospitalID */
  public void testgetAllWardsByHospitalID() {
    List<WardBean> list = new ArrayList<WardBean>();

    try {
      list = wd1.getAllWardsByHospitalID("1");
      assertNotNull(list);
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.getAllWardsByHospitalID("1");
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testGetHospitalByWard */
  public void testGetHospitalByWard() {
    HospitalBean hb = new HospitalBean();

    try {
      hb = wd1.getHospitalByWard("name");
      assertNull(hb);
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.getHospitalByWard("name");
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testGetWardRoom */
  public void testGetWardRoom() {
    WardRoomBean wrb = new WardRoomBean(0, 0, 0, "name", "status");

    try {
      wrb = wd1.getWardRoom("0");
      assertNull(wrb);
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.getWardRoom("0");
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testgetAllHCPsAssignedToWard */
  public void testgetAllHCPsAssignedToWard() {
    List<PersonnelBean> list = new ArrayList<PersonnelBean>();

    try {
      list = wd1.getAllHCPsAssignedToWard(1L);
      assertNotNull(list);
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.getAllHCPsAssignedToWard(1L);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testAddWard */
  public void testAddWard() {
    WardBean wb = new WardBean(0L, "name", 0L);

    try {
      assertTrue(wd1.addWard(wb));
    } catch (DBException e) {
      // TODO
    } catch (ITrustException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.addWard(wb);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }
  /** testGetWardRoomsByStatus */
  public void testGetWardRoomsByStatus() {

    List<WardRoomBean> list = new ArrayList<WardRoomBean>();

    try {
      list = wd1.getWardRoomsByStatus("status", 1L);
      assertNotNull(list);
    } catch (DBException e) {
      // TODO
    }

    try {
      expect(factory2.getConnection()).andThrow(new SQLException());
      ctrl.replay();
      wd2.getWardRoomsByStatus("status", 1L);
      fail();
    } catch (Exception e) {
      // TODO
    }
  }