@Override
    public Optional<Lock> unlock(@Nonnull String resource, @Nullable String lockContext) {
        return doUnlock(resource, getLockedByString(lockContext));
    }
@Test
    void unlock(MongoDBTestService mongodb) {
        final MongoLockService otherNodesLockService =
                new MongoLockService(otherNodeId, mongodb.mongoConnection(), MongoLockService.MIN_LOCK_TTL);

        final Lock orig = otherNodesLockService.lock("test-resource", null)
                .orElseThrow(() -> new IllegalStateException("Unable to create original lock."));
        assertThat(lockService.lock("test-resource", null)).isEmpty();

        final Optional<Lock> deletedLock = otherNodesLockService.unlock("test-resource", null);
        assertThat(deletedLock).hasValueSatisfying(l -> {
            assertThat(l.resource()).isEqualTo(orig.resource());
            assertThat(l.lockedBy()).isEqualTo(orig.lockedBy());
        });

        assertThat(lockService.lock("test-resource", null)).isNotEmpty();
    }