@Override
    public Optional<Lock> lock(@Nonnull String resource, @Nullable String lockContext) {
        return doLock(resource, getLockedByString(lockContext));
    }
@Test
    void alreadyTaken(MongoDBTestService mongodb) {
        if (new MongoLockService(otherNodeId, mongodb.mongoConnection(), MongoLockService.MIN_LOCK_TTL)
                .lock("test-resource", null).isEmpty()) {
            throw new IllegalStateException("Unable to create original lock.");
        }

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

        assertThat(lock).isEmpty();
    }