@Override
    public Optional<Lock> lock(@Nonnull String resource, @Nullable String lockContext) {
        return doLock(resource, getLockedByString(lockContext));
    }
@Test
    void lockWithContext() {
        Optional<Lock> lock = lockService.lock("test-resource", "1234");
        assertThat(lock).isPresent();

        // other context. lock should be non-reentrant
        Optional<Lock> lockOther = lockService.lock("test-resource", "9876");
        assertThat(lockOther).isNotPresent();

        Optional<Lock> lockAgain = lockService.lock("test-resource", "1234");
        assertThat(lockAgain).isPresent();
    }