### Question:
TLVSerializer { public static byte[] serializeResources (List<LWM2MResource> resources) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); for (LWM2MResource resource: resources) { serialize(resource, stream); } return stream.toByteArray(); }  static byte[] serialize(LWM2MObjectInstance... objects); static byte[] serialize(LWM2MResource... resources); static byte[] serializeObjectInstances(List<LWM2MObjectInstance> objects); static byte[] serializeResources(List<LWM2MResource> resources);  }### Answer:
@Test public void serializeTwoResources() throws Exception { LWM2MResource manufacturer = new LWM2MResource(LWM2MID.from(0), "ARM"); LWM2MResource model = new LWM2MResource(LWM2MID.from(1), "nanoservice 2"); byte[] tlv = TLVSerializer.serializeResources(Arrays.asList(manufacturer, model)); assertEquals (21, tlv.length); assertArrayEquals( new byte[] { (byte) 0b11_0_00_011, (byte) 0, 'A', 'R', 'M', (byte) 0b11_0_01_000, (byte) 1, (byte) 13, 'n', 'a', 'n', 'o', 's', 'e', 'r', 'v', 'i', 'c', 'e', ' ', '2' }, tlv); }