@Test
public void shouldGenerateRetriableLock() {

  when(retryTemplateConverter.construct(eq(locked))).thenReturn(retryTemplate);
  final var factory = new DefaultRetriableLockFactory(retryTemplateConverter);
  final var retriableLock = factory.generate(lock, locked);
  assertThat(retriableLock.getLock()).isEqualTo(lock);
  assertThat(retriableLock.getRetryTemplate()).isEqualTo(retryTemplate);
}