@Test public void testGetAllDeviceNull() { verify(m_deviceDao, never()).findAllDevices(); List<Device> deviceList = m_dm.getAllDevices(); verify(m_deviceDao).findAllDevices(); assertEquals(0, deviceList.size()); }
@Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) public List<Device> getAllDevices() { List<Device> allDevices = m_deviceDao.findAllDevices(); return allDevices; }
DeviceManagerImpl implements DeviceManager { @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) public List<Device> getAllDevices() { List<Device> allDevices = m_deviceDao.findAllDevices(); return allDevices; } }
DeviceManagerImpl implements DeviceManager { @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) public List<Device> getAllDevices() { List<Device> allDevices = m_deviceDao.findAllDevices(); return allDevices; } DeviceManagerImpl(DeviceDao deviceDao); }
DeviceManagerImpl implements DeviceManager { @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) public List<Device> getAllDevices() { List<Device> allDevices = m_deviceDao.findAllDevices(); return allDevices; } DeviceManagerImpl(DeviceDao deviceDao); void setDeviceDao(DeviceDao deviceDao); @Override void deviceAdded(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) Device getDevice(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) List<Device> getAllDevices(); @Override void deviceRemoved(String deviceName); @Override void devicePropertyChanged(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) void updateConfigAlignmentState(String deviceName, String verdict); @Override void removeDeviceStateProvider(DeviceStateProvider stateProvider); @Override void addDeviceStateProvider(DeviceStateProvider stateProvider); }
DeviceManagerImpl implements DeviceManager { @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) public List<Device> getAllDevices() { List<Device> allDevices = m_deviceDao.findAllDevices(); return allDevices; } DeviceManagerImpl(DeviceDao deviceDao); void setDeviceDao(DeviceDao deviceDao); @Override void deviceAdded(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) Device getDevice(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) List<Device> getAllDevices(); @Override void deviceRemoved(String deviceName); @Override void devicePropertyChanged(String deviceName); @Override @Transactional(value = Transactional.TxType.REQUIRED, rollbackOn = {RuntimeException.class}) void updateConfigAlignmentState(String deviceName, String verdict); @Override void removeDeviceStateProvider(DeviceStateProvider stateProvider); @Override void addDeviceStateProvider(DeviceStateProvider stateProvider);  }