@Test
public void testGetDataFile_ById() {

    final String sql = "select f from DataFile f where f.id = ?1";
    final int id = 23;
    final DataFile dataFile = createDataFile(id);
    when(persistenceManager.pick(sql, id)).thenReturn(dataFile);
    final DataFile toolStorageDatafile = jpaStorage.getDatafile(id);
    assertNotNull(toolStorageDatafile);
    assertEquals(id, toolStorageDatafile.getId());
    assertEquals("something", toolStorageDatafile.getPath());
    verify(persistenceManager, times(1)).pick(sql, id);
    verifyNoMoreInteractions(persistenceManager);
}