@Test
public void tryLock() {

    // given
    String preparationId = "preparation id";
    PersistentPreparation preparationMock = mock(PersistentPreparation.class);
    when(preparationRepository.get(preparationId, PersistentPreparation.class)).thenReturn(preparationMock);
    // when
    PersistentPreparation preparation =
            noOpLockedResourceRepository.tryLock(preparationId, "Toto", "toto de Charleville-Mézières");
    // then
    assertEquals(preparationMock, preparation);
    verify(preparationRepository).get(preparationId, PersistentPreparation.class);
}