Serializable directory = store.getConnectionParameters().get("directory");
tester.assertModelValue(directoryParamPath, directory);
WorkspaceInfo expectedWorkspace = catalog.getWorkspaceByName(MockData.CDF_PREFIX);
NamespaceInfo expectedNamespace = catalog.getNamespaceByPrefix(MockData.CDF_PREFIX);
// select the fifth item in the drop down, which is the cdf workspace
formTester.select("workspacePanel:border:paramValue", 4);
Component wsDropDown = tester.getComponentFromLastRenderedPage(wsDropdownPath);
tester.executeAjaxEvent(wsDropDown, "onchange");
// final String namespaceParamPath =
// "dataStoreForm:parameters:1:parameterPanel:border:paramValue";
// did the workspace change?
tester.assertModelValue(wsDropdownPath, expectedWorkspace);
// did the namespace change accordingly?
// tester.assertModelValue(namespaceParamPath, expectedNamespace);
tester.assertModelValue(namespaceParamPath, expectedNamespace.getURI());
tester.assertModelValue(directoryParamPath, directory);
// use clickLink to simulate hitting the save button instead of calling
// formTester.submit(). Otherwise the save action is not called at all
// print(tester.getLastRenderedPage(), true, true);
final boolean isAjax = true;
tester.clickLink("dataStoreForm:save", isAjax);
// did the save finish normally?
tester.assertRenderedPage(StorePage.class);
// was the namespace datastore parameter updated?
DataStoreInfo dataStore = catalog.getDataStore(store.getId());
Serializable namespace = dataStore.getConnectionParameters().get("namespace");
assertEquals(expectedNamespace.getURI(), namespace);
// was the namespace for the datastore resources updated?
List<FeatureTypeInfo> resourcesByStore = catalog.getResourcesByStore(dataStore,
FeatureTypeInfo.class);
for (FeatureTypeInfo ft : resourcesByStore) {