+ boolean check = false;
+ try {
+ check = remotePersistentSource.checkConnection();
+ } catch (CdmSourceException e) {
+ Assert.fail("checkConnection() on active cdm server should not have thrown CdmSourceException");
+ }
+ Assert.assertTrue(check);
+ } catch (CdmRemoteSourceException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void whenRequestingMetadatFromRemoteSourceThenMetaDataIsRetrieved() {
+ try {
+ remotePersistentSource = CdmPersistentRemoteSource.NewInstance("default");
+ Map<MetaDataPropertyName, String> cdmMetaDataMap = remotePersistentSource.getMetaDataMap();
+ for(MetaDataPropertyName mdpn : cdmMetaDataMap.keySet()) {
+ String value = cdmMetaDataMap.get(mdpn);
+ logger.info("MetaData Property " + mdpn.name() + " has value " + value);
+ Assert.assertNotNull("Meta Data Value for property for " + mdpn.name() + " should not be null", value);
+ }
+
+ } catch (CdmRemoteSourceException e) {
+ Assert.fail("Initialising an existing remote source should not throw an exception");
+ } catch (CdmSourceException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }