Properties null after thing created from discovery

I have discovered a device using UPnP. I set a new property from device details and created the discovery result.
Map<String, Object> properties = new HashMap<>(1);
properties.put(IPADDRESS, device.getDetails().getBaseURL());
DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)

I created thing from Paper UI and it was created successfully. But I am unable to get the properties I set when creating the Discovery Result.
In initialize() method of handler
Map<String, String> properties = new HashMap<>(1);
properties = getThing().getProperties();"Ip Address = "+ properties.get(IPADDRESS));

I am getting null. Please help me out here.

Solved my problem myself.

Actually in Handler, the following should be done
Map<String, Object> properties = new HashMap<>(1);
properties = getThing().getConfiguration().getProperties();