### Question:
LWM2MResourceInstance { public LWM2MID getId() { return id; } protected  LWM2MResourceInstance(LWM2MID id);  LWM2MResourceInstance(LWM2MID id, byte[] value);  LWM2MResourceInstance(LWM2MID id, String value);  LWM2MResourceInstance(LWM2MID id, int value); LWM2MID getId(); byte[] getValue(); String getStringValue(); boolean hasValue(); LWM2MResourceType getType(); void setType(LWM2MResourceType type); @Override String toString();  }### Answer:
@Test public void createWithNegativeID() throws Exception { LWM2MResourceInstance instance = new LWM2MResourceInstance(LWM2MID.create(), 42); assertEquals(-1, instance.getId().intValue()); }