@Test
public void testGetAdministrationTaskForBarcodeNoDueTasks()
{

  Mockito.reset(medicationsDao);
  Mockito
      .when(medicationsDao.getMedicationIdForBarcode("222"))
      .thenReturn(222L);
  Mockito
      .when(medicationsTasksProvider.findAdministrationTasks(
          Collections.singleton("1"),
          testTime.minusHours(1),
          testTime.plusHours(1)))
      .thenReturn(Collections.emptyList());
  final BarcodeTaskSearchDto dto = barcodeTaskFinder.getAdministrationTaskForBarcode("1", "222", testTime);
  assertEquals(BarcodeSearchResult.NO_TASK, dto.getBarcodeSearchResult());
  assertNull(dto.getTaskId());
}