use of org.apache.olingo.odata2.api.servicedocument.Collection in project camel by apache.
the class Olingo2AppAPITest method testServiceDocument.
@Test
public void testServiceDocument() throws Exception {
final TestOlingo2ResponseHandler<ServiceDocument> responseHandler = new TestOlingo2ResponseHandler<ServiceDocument>();
olingoApp.read(null, "", null, responseHandler);
final ServiceDocument serviceDocument = responseHandler.await();
final List<Collection> collections = serviceDocument.getAtomInfo().getWorkspaces().get(0).getCollections();
assertEquals("Service Atom Collections", 3, collections.size());
LOG.info("Service Atom Collections: {}", collections);
final List<EdmEntitySetInfo> entitySetsInfo = serviceDocument.getEntitySetsInfo();
assertEquals("Service Entity Sets", 3, entitySetsInfo.size());
LOG.info("Service Document Entries: {}", entitySetsInfo);
}
Aggregations