@Test
public void testFindAssetsByTenantIdAndCustomerId() {

    UUID tenantId1 = UUIDs.timeBased();
    UUID tenantId2 = UUIDs.timeBased();
    UUID customerId1 = UUIDs.timeBased();
    UUID customerId2 = UUIDs.timeBased();
    for (int i = 0; i < 60; i++) {
        UUID assetId = UUIDs.timeBased();
        UUID tenantId = i % 2 == 0 ? tenantId1 : tenantId2;
        UUID customerId = i % 2 == 0 ? customerId1 : customerId2;
        saveAsset(assetId, tenantId, customerId, "ASSET_" + i, "TYPE_1");
    }
    TextPageLink pageLink1 = new TextPageLink(20, "ASSET_");
    List<Asset> assets1 = assetDao.findAssetsByTenantIdAndCustomerId(tenantId1, customerId1, pageLink1);
    assertEquals(20, assets1.size());
    TextPageLink pageLink2 = new TextPageLink(20, "ASSET_", assets1.get(19).getId().getId(), null);
    List<Asset> assets2 = assetDao.findAssetsByTenantIdAndCustomerId(tenantId1, customerId1, pageLink2);
    assertEquals(10, assets2.size());
    TextPageLink pageLink3 = new TextPageLink(20, "ASSET_", assets2.get(9).getId().getId(), null);
    List<Asset> assets3 = assetDao.findAssetsByTenantIdAndCustomerId(tenantId1, customerId1, pageLink3);
    assertEquals(0, assets3.size());
}