ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
entity.write(outputStream);
String resp = outputStream.toString();
HierarchicalPropertyEntityProvider entityProvider = new HierarchicalPropertyEntityProvider();
HierarchicalProperty multistatus =
entityProvider.readFrom(null, null, null, null, null, new ByteArrayInputStream(resp.getBytes()));
assertEquals(new QName("DAV:", "multistatus"), multistatus.getName());
assertEquals(2, multistatus.getChildren().size());
assertEquals(new QName("DAV:", "response"), multistatus.getChild(0).getName());
assertEquals(new QName("DAV:", "response"), multistatus.getChild(1).getName());