@Test public void testRemoveKey() { DeviceKeyId deviceKeyId = DeviceKeyId.deviceKeyId(deviceKeyIdValue); DeviceKey deviceKey = DeviceKey.createDeviceKeyUsingCommunityName(deviceKeyId, deviceKeyLabel, deviceKeySnmpName); manager.addKey(deviceKey); manager.removeKey(deviceKeyId); deviceKey = manager.getDeviceKey(deviceKeyId); assertNull("The device key set should be empty.", deviceKey); validateEvents(DeviceKeyEvent.Type.DEVICE_KEY_ADDED, DeviceKeyEvent.Type.DEVICE_KEY_REMOVED); }
@Override public void removeKey(DeviceKeyId deviceKeyId) { checkNotNull(deviceKeyId, "Device key identifier cannot be null"); store.deleteDeviceKey(deviceKeyId); }
DeviceKeyManager extends AbstractListenerManager<DeviceKeyEvent, DeviceKeyListener> implements DeviceKeyService, DeviceKeyAdminService { @Override public void removeKey(DeviceKeyId deviceKeyId) { checkNotNull(deviceKeyId, "Device key identifier cannot be null"); store.deleteDeviceKey(deviceKeyId); } }
DeviceKeyManager extends AbstractListenerManager<DeviceKeyEvent, DeviceKeyListener> implements DeviceKeyService, DeviceKeyAdminService { @Override public void removeKey(DeviceKeyId deviceKeyId) { checkNotNull(deviceKeyId, "Device key identifier cannot be null"); store.deleteDeviceKey(deviceKeyId); }  }
DeviceKeyManager extends AbstractListenerManager<DeviceKeyEvent, DeviceKeyListener> implements DeviceKeyService, DeviceKeyAdminService { @Override public void removeKey(DeviceKeyId deviceKeyId) { checkNotNull(deviceKeyId, "Device key identifier cannot be null"); store.deleteDeviceKey(deviceKeyId); }  @Activate void activate(); @Deactivate void deactivate(); @Override void addKey(DeviceKey deviceKey); @Override void removeKey(DeviceKeyId deviceKeyId); @Override Collection<DeviceKey> getDeviceKeys(); @Override DeviceKey getDeviceKey(DeviceKeyId deviceKeyId); }
DeviceKeyManager extends AbstractListenerManager<DeviceKeyEvent, DeviceKeyListener> implements DeviceKeyService, DeviceKeyAdminService { @Override public void removeKey(DeviceKeyId deviceKeyId) { checkNotNull(deviceKeyId, "Device key identifier cannot be null"); store.deleteDeviceKey(deviceKeyId); }  @Activate void activate(); @Deactivate void deactivate(); @Override void addKey(DeviceKey deviceKey); @Override void removeKey(DeviceKeyId deviceKeyId); @Override Collection<DeviceKey> getDeviceKeys(); @Override DeviceKey getDeviceKey(DeviceKeyId deviceKeyId);  }