@Test
public void serializeMultipleResource() throws Exception {

    LWM2MResourceInstance internalBattery = new LWM2MResourceInstance(LWM2MID.create(), 0x01);
    LWM2MResourceInstance usbBattery = new LWM2MResourceInstance(LWM2MID.create(), 0x05);
    LWM2MResource power = new LWM2MResource(LWM2MID.from(6), Arrays.asList(internalBattery, usbBattery));
    byte[] powerTLV = TLVSerializer.serialize(power);
    assertEquals(8, powerTLV.length);
    assertArrayEquals( new byte[] {
            (byte) 0b10_0_00_110,
            (byte) 6,
            (byte) 0b01_0_00_001,
            (byte) 0,
            (byte) 0x01,
            (byte) 0b01_0_00_001,
            (byte) 1,
            (byte) 0x05,
            },
            powerTLV);
}