@Test
public void testCIDAThredds() {

	URI catalogURI = null;
	try {
		catalogURI = NetCDFUtilityTest.class.getResource("internal_cida.xml").toURI();
	} catch (URISyntaxException ex) {
		fail(ex.getMessage());
	}
	InvCatalogFactory factory = new InvCatalogFactory("default", true);
	InvCatalog catalog = factory.readXML(catalogURI);
	StringBuilder errorBuilder = new StringBuilder();
	if (!catalog.check(errorBuilder)) {
		fail(errorBuilder.toString());
	}
	List<InvAccess> openDAPHandlesFromCatalog = NetCDFUtility.getDatasetHandles(catalog, ServiceType.OPENDAP);
	assertEquals(12, openDAPHandlesFromCatalog.size());
	assertEquals("CIDA Development and Testing USGS Internal THREDDS Server.", catalog.getName());
	assertEquals("1.0.1", catalog.getVersion());
	assertTrue(catalog.getProperties().isEmpty());
	List<InvService> invServiceList = catalog.getServices();
	assertFalse(invServiceList.isEmpty());
	InvDataset invDataSet = catalog.findDatasetByID("gmo/GMO_w_meta.ncml");
	DataFormatType dft = invDataSet.getDataFormatType();
	assertEquals("NetCDF-Grid", dft.toString());
	String catalogURL = invDataSet.getCatalogUrl();
	assertTrue(catalogURL.contains("file:/"));
	assertTrue(catalogURL.contains("gdp-data-access/target/test-classes/gov/usgs/cida/gdp/dataaccess/helper/internal_cida.xml#gmo/GMO_w_meta.ncml"));
	String auth = invDataSet.getAuthority();
	assertNull(auth);
	assertFalse(invDataSet.hasNestedDatasets());
	List<DateType> dateList = invDataSet.getDates();
	assertTrue(dateList.isEmpty());
	assertTrue(invDataSet.hasAccess());
	InvAccess invAccess = invDataSet.getAccess(ServiceType.DODS);
	assertNull(invAccess);
	invAccess = invDataSet.getAccess(ServiceType.HTTPServer);
	assertNotNull(invAccess);
	assertTrue(Double.isNaN(invAccess.getDataSize()));
	assertEquals("gmo/GMO_w_meta.ncml", invAccess.getUrlPath());
	assertFalse(invAccess.hasDataSize());
	assertTrue(invAccess.getUnresolvedUrlName().contains("/thredds/"));
	assertTrue(invAccess.getUnresolvedUrlName().contains("/gmo/GMO_w_meta.ncml"));
	List<InvAccess> invList = invDataSet.getAccess();
	assertFalse(invList.isEmpty());
	assertEquals(invList.size(), 4);
}