WMTSCapabilitiesAdapter extends OWSCommon110CapabilitiesAdapter { public List<TileMatrixSet> parseTileMatrixSets() throws XMLStreamException { OMElement contentsElement = getElement( getRootElement(), new XPath( "wmts:Contents", nsContext ) ); XMLStreamReader xmlStream = contentsElement.getXMLStreamReader(); skipStartDocument( xmlStream ); nextElement( xmlStream ); List<TileMatrixSet> tileMatrixSets = emptyList(); if ( skipToElementOnSameLevel( xmlStream, TILE_MATRIX_SET ) ) { tileMatrixSets = parseTileMatrixSets( xmlStream ); } return tileMatrixSets; } WMTSCapabilitiesAdapter(); List<Layer> parseLayers(); List<TileMatrixSet> parseTileMatrixSets();  }
@Test public void testParseTileMatrixSets() throws XMLStreamException { List<TileMatrixSet> tileMatrixSets = adapter.parseTileMatrixSets(); assertEquals( 1, tileMatrixSets.size() ); }