### Question:
LinkFormatCodec implements ContentCodec { @Override public <T> T bytesToValue(byte[] body, DataSchema<T> schema, Map<String, String> parameters) throws ContentCodecException { Pattern pattern = Pattern.compile("^(.+)=\"(.+)\""); if (schema.getType().equals("object")) { Map<String, Map<String, String>> entries = new HashMap<>(); String bodyString = new String(body); String[] entriesString = bodyString.split(","); for (String entryString : entriesString) { List<String> entryComponentsString = new ArrayList(Arrays.asList(entryString.split(";", 4))); String entryKey = entryComponentsString.remove(0); Map<String, String> entryParameters = new HashMap<>(); entryComponentsString.forEach(s -> { Matcher matcher = pattern.matcher(s); if (matcher.find()) { String key = matcher.group(1); String value = matcher.group(2); entryParameters.put(key, value); } }); entries.put(entryKey, entryParameters); } return (T) entries; } else { throw new ContentCodecException("Non-object data schema not implemented yet"); } }  @Override String getMediaType(); @Override T bytesToValue(byte[] body,
                              DataSchema<T> schema,
                              Map<String, String> parameters); @Override byte[] valueToBytes(Object value, Map<String, String> parameters);  }### Answer:
@Test public void bytesToValue() throws ContentCodecException { byte[] bytes = "</reg/1/>;ep=\"RIOT-34136DAB556DC1D3\";base=\"coap: Map<String, Map<String, String>> value = codec.bytesToValue(bytes, new ObjectSchema()); assertThat(value, hasKey("</reg/1/>")); assertThat(value, hasKey("</reg/2/>")); }