use of org.neo4j.storageengine.api.ExternalStoreId in project neo4j by neo4j.
the class MetaDataStoreTest method setExternalStoreIdShouldSetAllRelatedFields.
@Test
void setExternalStoreIdShouldSetAllRelatedFields() throws IOException {
// given
UUID externalStoreId = UUID.randomUUID();
// when
try (MetaDataStore store = newMetaDataStore()) {
MetaDataStore.setExternalStoreUUID(pageCache, store.getStorageFile(), externalStoreId, databaseLayout.getDatabaseName(), NULL);
}
// then
try (MetaDataStore store = newMetaDataStore()) {
Optional<ExternalStoreId> retrievedExternalStoreIdOptional = store.getExternalStoreId();
assertTrue(retrievedExternalStoreIdOptional.isPresent());
ExternalStoreId retrievedExternalStoreId = retrievedExternalStoreIdOptional.get();
assertEquals(externalStoreId, retrievedExternalStoreId.getId());
}
}
Aggregations