@Test
  public void testGetTimeLeaseVmPoolMap() {
    time_lease_vm_pool_map result =
        dao.getTimeLeasedVmPoolMapByIdForVmPool(
            existingTimeLeaseVmPoolMap.getid(), existingTimeLeaseVmPoolMap.getvm_pool_id());

    assertNotNull(result);
    assertEquals(existingTimeLeaseVmPoolMap, result);
  }
  @Test
  public void testRemoveTimeLeaseVmPoolMap() {
    dao.removeTimeLeasedVmPoolMap(
        existingTimeLeaseVmPoolMap.getid(), existingTimeLeaseVmPoolMap.getvm_pool_id());

    time_lease_vm_pool_map result =
        dao.getTimeLeasedVmPoolMapByIdForVmPool(
            existingTimeLeaseVmPoolMap.getid(), existingTimeLeaseVmPoolMap.getvm_pool_id());

    assertNull(result);
  }
  @Test
  public void testAddTimeLeaseVmPoolMap() {
    dao.addTimeLeasedVmPoolMap(newTimeLeaseVmPoolMap);

    time_lease_vm_pool_map result =
        dao.getTimeLeasedVmPoolMapByIdForVmPool(
            newTimeLeaseVmPoolMap.getid(), newTimeLeaseVmPoolMap.getvm_pool_id());

    assertNotNull(result);
    assertEquals(newTimeLeaseVmPoolMap, result);
  }
  @Test
  public void testUpdateTimeLeaseVmPoolMap() {
    existingTimeLeaseVmPoolMap.settype(100 - existingTimeLeaseVmPoolMap.gettype());

    dao.updateTimeLeasedVmPoolMap(existingTimeLeaseVmPoolMap);

    time_lease_vm_pool_map result =
        dao.getTimeLeasedVmPoolMapByIdForVmPool(
            existingTimeLeaseVmPoolMap.getid(), existingTimeLeaseVmPoolMap.getvm_pool_id());

    assertEquals(existingTimeLeaseVmPoolMap, result);
  }
  @Override
  public void setUp() throws Exception {
    super.setUp();

    dao = prepareDAO(dbFacade.getVmPoolDAO());

    existingVmPool = dao.get(EXISTING_VM_POOL_ID);
    deletableVmPool = dao.get(DELETABLE_VM_POOL_ID);

    newVmPool = new vm_pools();
    newVmPool.setvm_pool_name("New VM Pool");
    newVmPool.setvm_pool_description("This is a new VM pool.");
    newVmPool.setvds_group_id(VDS_GROUP_ID);

    existingVmPoolMap = dao.getVmPoolMapByVmGuid(new Guid("77296e00-0cad-4e5a-9299-008a7b6f4355"));
    newVmPoolMap = new vm_pool_map(FREE_VM_ID, existingVmPool.getvm_pool_id());

    existingTimeLeaseVmPoolMap =
        dao.getTimeLeasedVmPoolMapByIdForVmPool(EXISTING_LEASE_ID, EXISTING_VM_POOL_ID);
    newTimeLeaseVmPoolMap =
        new time_lease_vm_pool_map(new Date(), Guid.NewGuid(), new Date(), 1, FREE_VM_POOL_ID);
  }