@Override
    public NodeId get() {
        return new SimpleNodeId(readOrGenerate(filename));
    }
@Test
    void testNonexistentFile() throws IOException {

        final Path nodeIdPath = tempDir.resolve(NODE_ID_FILENAME);

        final String filename = nodeIdPath.toAbsolutePath().toString();
        final FilePersistedNodeIdProvider provider = new FilePersistedNodeIdProvider(filename);

        // first let the logic generate and persist a new ID
        final NodeId nodeId = provider.get();
        final String generatedNodeId = nodeId.getNodeId();
        Assertions.assertThat(generatedNodeId).isNotBlank();

        // verify that content of the file is the same as the returned ID
        Assertions.assertThat(Files.readString(Path.of(filename))).isEqualTo(generatedNodeId);

        // now let's start again, but with a file that already contains an ID
        final FilePersistedNodeIdProvider anotherProvider = new FilePersistedNodeIdProvider(filename);
        Assertions.assertThat(anotherProvider.get().getNodeId()).isEqualTo(generatedNodeId);
    }