@Test
public void shouldLock() {

  final var now = System.currentTimeMillis();
  final var token = lock.acquire(Collections.singletonList("1"), "locks", 1000);
  assertThat(token).isEqualTo("abc");
  final var acquiredLockMap = jdbcTemplate.queryForObject("SELECT * FROM locks WHERE id = 1", new ColumnMapRowMapper());
  assertThat(acquiredLockMap).containsAllEntriesOf(values("1", "abc"));
  final var expireAt = acquiredLockMap.get("expireAt");
  assertThat(((Date) expireAt).getTime()).isCloseTo(now + 1000, Offset.offset(100L));
}