@Test
public void addResource() throws Exception {

    LWM2MObjectInstance instance = new LWM2MObjectInstance(new LWM2MResource(LWM2MID.from("dev"), 56));
    instance.addResource(new LWM2MResource(LWM2MID.$1, 42));
    assertEquals (2, instance.getResources().size());
    assertEquals("42", instance.getResource(LWM2MID.$1).getStringValue() );
}