@Override
    public Optional<Lock> lock(@Nonnull String resource, @Nullable String lockContext) {
        return doLock(resource, getLockedByString(lockContext));
    }
@Test
    void newLock() {
        ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);

        final Optional<Lock> lock = lockService.lock("test-resource", null);

        assertThat(lock).hasValueSatisfying(l -> {
            assertThat(l.resource()).isEqualTo("test-resource");
            assertThat(l.lockedBy()).isEqualTo(THIS_NODE_ID);
            assertThat(l.createdAt()).isCloseTo(now, within(10, SECONDS));
            assertThat(l.updatedAt()).isCloseTo(now, within(10, SECONDS));
        });
    }