@Test
public void shouldLock() {

  final var expectedExpiration = LocalDateTime.now().plus(1000, ChronoUnit.MILLIS);
  final var token = lock.acquire(Collections.singletonList("1"), "locks", 1000);
  assertThat(token).isEqualTo("abc");
  final var document = mongoTemplate.findById("1", LockDocument.class, "locks");
  assertThat(document.getToken()).isEqualTo("abc");
  assertThat(document.getExpireAt()).isCloseTo(expectedExpiration, new TemporalUnitWithinOffset(100, ChronoUnit.MILLIS));
}