### Question:
NodeVirtualImageDAO extends DefaultDAOBase<Integer, NodeVirtualImage> { public VirtualAppliance findVirtualAppliance(final VirtualMachine vmachine) { NodeVirtualImage node = findByVirtualMachine(vmachine); return node != null ? node.getVirtualAppliance() : null; } NodeVirtualImageDAO();  NodeVirtualImageDAO(final EntityManager entityManager); VirtualAppliance findVirtualAppliance(final VirtualMachine vmachine); NodeVirtualImage findByVirtualMachine(final VirtualMachine vmachine); List<NodeVirtualImage> findByEnterprise(final Enterprise enterprise); List<NodeVirtualImage> findByVirtualImage(final VirtualMachineTemplate virtualImage); List<NodeVirtualImage> findByVirtualAppliance(final VirtualAppliance virtualAppliance); List<Integer> findVirtualMachineIdsByVirtualAppliance(
        final VirtualAppliance virtualAppliance);  }### Answer:
@Test public void testFindVirtualApplianceWithUnexistentVirtualMachine() { NodeVirtualImage nodeVirtualImage = eg().createInstance(vapp, vmachine); ds().persistAll(nodeVirtualImage); NodeVirtualImageDAO nodeVirtualImageDAO = createDaoForRollbackTransaction(); VirtualMachine vmachineUnexisting = virtualMachineGenerator.createUniqueInstance(); VirtualAppliance result = nodeVirtualImageDAO.findVirtualAppliance(vmachineUnexisting); assertNull(result); }