### Question:
JpaBaseComponentDescriptorDao extends JpaAbstractSearchTextDao<ComponentDescriptorEntity, ComponentDescriptor> implements ComponentDescriptorDao { @Override public List<ComponentDescriptor> findByTypeAndPageLink(TenantId tenantId, ComponentType type, TextPageLink pageLink) { return DaoUtil.convertDataList(componentDescriptorRepository .findByType( type, Objects.toString(pageLink.getTextSearch(), ""), pageLink.getIdOffset() == null ? NULL_UUID_STR : UUIDConverter.fromTimeUUID(pageLink.getIdOffset()), new PageRequest(0, pageLink.getLimit()))); }  @Override Optional<ComponentDescriptor> saveIfNotExist(TenantId tenantId, ComponentDescriptor component); @Override ComponentDescriptor findById(TenantId tenantId, ComponentDescriptorId componentId); @Override ComponentDescriptor findByClazz(TenantId tenantId, String clazz); @Override List<ComponentDescriptor> findByTypeAndPageLink(TenantId tenantId, ComponentType type, TextPageLink pageLink); @Override List<ComponentDescriptor> findByScopeAndTypeAndPageLink(TenantId tenantId, ComponentScope scope, ComponentType type, TextPageLink pageLink); @Override @Transactional void deleteById(TenantId tenantId, ComponentDescriptorId componentId); @Override @Transactional void deleteByClazz(TenantId tenantId, String clazz);  }### Answer:
@Test public void findByType() { for (int i = 0; i < 20; i++) { createComponentDescriptor(ComponentType.FILTER, ComponentScope.SYSTEM, i); createComponentDescriptor(ComponentType.ACTION, ComponentScope.TENANT, i + 20); } TextPageLink pageLink1 = new TextPageLink(15, "COMPONENT_"); List<ComponentDescriptor> components1 = componentDescriptorDao.findByTypeAndPageLink(AbstractServiceTest.SYSTEM_TENANT_ID, ComponentType.FILTER, pageLink1); assertEquals(15, components1.size()); TextPageLink pageLink2 = new TextPageLink(15, "COMPONENT_", components1.get(14).getId().getId(), null); List<ComponentDescriptor> components2 = componentDescriptorDao.findByTypeAndPageLink(AbstractServiceTest.SYSTEM_TENANT_ID,ComponentType.FILTER, pageLink2); assertEquals(5, components2.size()); }