DeviceManagerImpl implements DeviceManager { @Override public void deviceAdded(String deviceName) { for (DeviceStateProvider provider : m_deviceStateProviders) { provider.deviceAdded(deviceName); } } 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);  }
@Test public void testCallDeviceAdded() { m_dm.deviceAdded("deviceA"); verify(m_deviceConnectionStateProvider).deviceAdded("deviceA"); verify(m_deviceAlignmentStateProvider).deviceAdded("deviceA"); }