@Test
public void testFindDevicesByTenantIdAndIdsAsync() throws ExecutionException, InterruptedException {

    UUID tenantId1 = UUIDs.timeBased();
    UUID customerId1 = UUIDs.timeBased();
    UUID tenantId2 = UUIDs.timeBased();
    UUID customerId2 = UUIDs.timeBased();
    List<UUID> deviceIds = new ArrayList<>();
    for(int i = 0; i < 5; i++) {
        UUID deviceId1 = UUIDs.timeBased();
        UUID deviceId2 = UUIDs.timeBased();
        deviceDao.save(getDevice(tenantId1, customerId1, deviceId1));
        deviceDao.save(getDevice(tenantId2, customerId2, deviceId2));
        deviceIds.add(deviceId1);
        deviceIds.add(deviceId2);
    }
    ListenableFuture<List<Device>> devicesFuture = deviceDao.findDevicesByTenantIdAndIdsAsync(tenantId1, deviceIds);
    List<Device> devices = devicesFuture.get();
    assertEquals(5, devices.size());
}