code: public Device addDevice(String id, String token) throws DuplicateDeviceException, NullIdException, NullDeviceTokenException, Exception {
  		if ((id == null) || (id.trim().equals(""))) {
  			throw new NullIdException();
  		} else if ((token == null) || (token.trim().equals(""))) {
  			throw new NullDeviceTokenException();
  		} else {
  			if (!this.devices.containsKey(id)) {
  				token = token.trim().replace(" ", "");
  				BasicDevice device = new BasicDevice(id, token, new Timestamp(Calendar.getInstance().getTime().getTime()));
  				this.devices.put(id, device);
  				return device;
  			} else {
  				throw new DuplicateDeviceException();
  			}
  		}
  	}
docs: Add a device to the map
  @param id The device id
  @param token The device token
  @throws DuplicateDeviceException
  @throws NullIdException
  @throws NullDeviceTokenException