use of com.zimbra.soap.admin.message.GetAllConfigResponse in project zm-mailbox by Zimbra.
the class GetAllConfigTest method unmarshallGetAllConfigResponseTest.
@Test
public void unmarshallGetAllConfigResponseTest() throws Exception {
InputStream is = getClass().getResourceAsStream("GetAllConfigResponse.xml");
Element elem = Element.parseXML(is);
List<KeyValuePair> kvps = elem.listKeyValuePairs();
is.close();
is = getClass().getResourceAsStream("GetAllConfigResponse.xml");
GetAllConfigResponse resp = (GetAllConfigResponse) unmarshaller.unmarshal(is);
Assert.assertNotNull("Response", resp);
List<Attr> attrs = resp.getAttrs();
LOG.info("unmarshallGetAllConfigResponseTest:KVPS from elem=" + kvps.size() + " from jaxb=" + attrs.size());
Assert.assertTrue("Have some attrs", attrs.size() > 20);
Assert.assertEquals("Number of attrs from elem and from jaxb agree", kvps.size(), attrs.size());
}
Aggregations