form.setValue("settings:enabled", true);
form.submit();
// Check if no error has been found
tester.assertNoErrorMessage();
// Get GeoServer object for retrieving the settings associated to the workspace
GeoServer gs = getGeoServer();
assertNotNull(gs.getSettings(citeWorkspace));
// Reload the page
tester.startPage(new WorkspaceEditPage(citeWorkspace));
tester.assertRenderedPage(WorkspaceEditPage.class);
// CQL expression
String expression = "stringTemplate(path, '(\\w{4})_(\\w{7})_(\\d{3})_(\\d{4})(\\d{2})(\\d{2})T(\\d{7})_(\\d{2})\\.(\\w{4})', "
+ "'/${1}/${4}/${5}/${6}/${0}')";
// Set the root directory
FormTester form2 = tester.newFormTester("form");
form2.setValue("settings:settingsContainer:otherSettings:extensions:0:content:ecqlexp",
expression);
form2.submit();
// Check if no error has been found
tester.assertNoErrorMessage();
// Control if the defined root has been correctly set
assertEquals(
gs.getSettings(citeWorkspace).getMetadata()
.get(RESTUploadECQLPathMapper.EXPRESSION_KEY, String.class), expression);
}