### Question:
VolumeManagement extends RasdManagement { public boolean isStateful() { return virtualMachineTemplate != null; } VolumeManagement();  VolumeManagement(final String uuid, final String name, final long sizeInMB,
        final String idScsi, final StoragePool pool, final VirtualDatacenter virtualDatacenter); @Required(value = STORAGE_POOL_REQUIRED) StoragePool getStoragePool(); void setStoragePool(final StoragePool storagePool); @Required(value = VIRTUAL_MACHINE_TEMPLATE_REQUIRED) VirtualMachineTemplate getVirtualMachineTemplate(); void setVirtualMachineTemplate(final VirtualMachineTemplate virtualMachineTemplate); boolean isStateful(); @Required(value = ID_SCSI_REQUIRED) @Length(min = ID_SCSI_LENGTH_MIN, max = ID_SCSI_LENGTH_MAX) @LeadingOrTrailingWhitespace(allowed = ID_SCSI_LEADING_OR_TRAILING_WHITESPACES_ALLOWED) @IscsiPath String getIdScsi(); void setIdScsi(final String idScsi); VolumeState getState(); void setState(final VolumeState state); long getUsedSizeInMB(); void setUsedSizeInMB(final long usedSizeInMB); String getUuid(); String getName(); void setName(final String name); long getSizeInMB(); void setSizeInMB(final long sizeInMB); long getAvailableSizeInMB(); void setAvailableSizeInMB(final long availableSizeInMB); @Override void attach(final int sequence, final VirtualMachine vm); @Override void detach(); @Override boolean isAttached(); @Override String toString(); static final String DISCRIMINATOR; static final String ALLOCATION_UNITS; static final String TABLE_NAME; static final String VOLUMES_BY_VDC; static final String VOLUMES_BY_POOL; static final String VOLUMES_ATTACHED_TO_VM; static final String VOLUMES_AVAILABLES; static final String NOT_TEMP; static final String ONLY_TEMP; static final String BY_VDC; static final String BY_POOL; static final String ATTACHED_TO_VM; static final String AVAILABLES; static final String BY_VAPP; final static String STORAGE_POOL_PROPERTY; final static String VIRTUAL_MACHINE_TEMPLATE_PROPERTY; final static String ID_SCSI_PROPERTY; final static int ID_SCSI_LENGTH_MIN; final static int ID_SCSI_LENGTH_MAX; final static String STATE_PROPERTY; final static String USED_SIZE_PROPERTY; }### Answer:
@Test public void testIsStateful() { VolumeManagement volume = createUniqueEntity(); volume.setVirtualMachineTemplate(null); assertFalse(volume.isStateful()); virtualImageGenerator = new VirtualMachineTemplateGenerator(getSeed()); VirtualMachineTemplate virtualImage = virtualImageGenerator.createUniqueInstance(); volume.setVirtualMachineTemplate(virtualImage); assertTrue(volume.isStateful()); }