@@ -0,0 +1,1458 @@
+package com.simplelwm2m.simplelwm2m;%0A%0Aimport java.util.Random;%0A%0Apublic class MockLwmM2mClientDemo %7B%0A%0A    /**%0A    * Create a mock client that registers to a LWM2M server running on the localhost%0A    * @param args%0A    */%0A    public static void main(String%5B%5D args) %7B%0A%0A        Random rng = new Random();%0A        String serverURI = %22coap://localhost:5683%22;%0A        String endpoint = %22mockClient%22;%0A        MockLwM2mClient device = new MockLwM2mClient(endpoint, serverURI);%0A%0A        // Add a temperature sensor%0A        SimpleResource resource = new SimpleResource(%225700%22);%0A        SimpleResource instance = new SimpleResource(%220%22);%0A        SimpleResource object = new SimpleResource(%223303%22);%0A        instance.add(resource);%0A        object.add(instance);%0A        device.addObject(%223303%22, object);%0A%0A        // Start device and send registration%0A        device.start(true);%0A        for (int i = 0; i %3C 60; i++) %7B%0A            /*%0A            * Change the value of the resource. If an observe relation is established%0A            * (for instance from the web UI of Leshan's server demo) observers will be%0A            * notified.%0A            */%0A            resource.setResourceValue(Integer.toString(rng.nextInt(100)));%0A            try %7B%0A                Thread.currentThread().sleep(1000);%0A            %7D catch (InterruptedException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D%0A        // Stop device and derregister%0A        device.stop(true);%0A    %7D%0A%0A%7D%0A

Add an example of a client with a temperature sensor connecting to a server running on coap://localhost:5683