"<string>" + dir.getAbsolutePath() + "</string>" +
"</directory>" +
"</connectionParameters>" +
"<workspace>sf</workspace>" +
"</dataStore>";
MockHttpServletResponse response =
postAsServletResponse( "/rest/workspaces/sf/datastores", xml, "text/xml" );
assertEquals( 201, response.getStatusCode() );
assertNotNull( response.getHeader( "Location") );
assertTrue( response.getHeader("Location").endsWith( "/workspaces/sf/datastores/newDataStore" ) );
DataStoreInfo newDataStore = catalog.getDataStoreByName( "newDataStore" );
assertNotNull( newDataStore );
DataStore ds = (DataStore) newDataStore.getDataStore(null);