### Question:
DeviceServiceHandler extends AbstractPlatformService { @Override protected void handleEvent(PlatformMessage message) throws Exception { MessageBody body = message.getValue(); String type = body.getMessageType(); switch (type) { case DeviceAdvancedCapability.RemovedDeviceEvent.NAME: handleRemovedDeviceEvent(message.getValue()); break; case Capability.EVENT_DELETED: handleDeletedEvent(message); break; case HubAdvancedCapability.GetDeviceInfoResponse.NAME: addDevice(message.getValue()); break; case com.iris.messages.service.DeviceService.DevicesDegradedEvent.NAME: syncDegradedDevices(message, body); break; default: super.handleEvent(message); break; } } @Inject  DeviceServiceHandler(
	      PlatformMessageBus platformBus,
	      DriverServiceConfig config,
	      DeviceDAO deviceDao,
	      HubDAO hubDao,
	      IpcdDeviceDao ipcdDeviceDao,
	      PersonDAO personDao,
	      PersonPlaceAssocDAO personPlaceAssocDao,
	      DeviceService service,
	      PlatformDriverService driverService
   ); @Override MessageBody handleRequest(PlatformMessage message); MessageBody addDevice(MessageBody request); void handleRemovedDeviceEvent(MessageBody request); MessageBody syncDevices(PlatformMessage msg, MessageBody request); void syncDegradedDevices(PlatformMessage msg, MessageBody request); static final String NAME; static final String LEGACY_DEVICESYNCRESPONSE_NAMESPACE; static final String LEGACY_DEVICESYNC_NAMESPACE; }### Answer:
@Test public void testOnPlaceDeletedOnlyRemovesWithoutHubId() throws Exception { EasyMock.expect(devDao.listDevicesByPlaceId(placeId, true)).andReturn(devices); EasyMock.expect(execReg.delete(Address.fromString(devices.get(1).getAddress()))).andReturn(true); replay(); handler.handleEvent(createPlaceDeleted()); }