public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
boolean isEnrolled = false;
try {
if (log.isDebugEnabled()) {
log.debug("Checking the enrollment of Connected Cup device : " + deviceId.getId());
<BUG>}
IotDevice iotDevice =
iotDeviceManagementDAOFactory.getIotDeviceDAO().getIotDevice(
deviceId.getId());</BUG>
if (iotDevice != null) {

public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
boolean isEnrolled = false;
try {
if (log.isDebugEnabled()) {
log.debug("Checking the enrollment of Connected Cup device : " + deviceId.getId());
}
Device iotDevice = connectedCupDAO.getConnectedCupDeviceDAO().getDevice(deviceId.getId());
if (iotDevice != null) {
