final XOfficeDatabaseDocument dataSourceAccess = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, databaseDoc);
final XPropertySet dsProperties = UnoRuntime.queryInterface(XPropertySet.class, dataSourceAccess.getDataSource());
dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb");
final String documentURL = createTempFileURL();
storeDoc.storeAsURL(documentURL, new PropertyValue[0]);
// now that the document is stored, ...
// ... its URL should be correct
assertEquals("wrong URL after storing the document", documentURL, databaseDoc.getURL());
// ... it should be initialized