@Test public void getAllTargetTypeDetailsTest() { List<TargetTypesProjections> targetTypesDetails = new ArrayList<TargetTypesProjections>(); targetTypesDetails.add(getTargetTypesProjections()); Page<TargetTypesProjections> allTargetTypesDetails = new PageImpl<TargetTypesProjections>(targetTypesDetails,new PageRequest(0, 1), targetTypesDetails.size()); when(targetTypesService.getAllTargetTypeDetails(StringUtils.EMPTY, 0, 1)).thenReturn(allTargetTypesDetails); assertThat(targetTypesRepository.findAllTargetTypeDetails(StringUtils.EMPTY, new PageRequest(0, 1)), is(notNullValue())); }
@Override public Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size) { return targetTypesRepository.findAllTargetTypeDetails(searchTerm.toLowerCase(), new PageRequest(page, size)); }
TargetTypesServiceImpl implements TargetTypesService { @Override public Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size) { return targetTypesRepository.findAllTargetTypeDetails(searchTerm.toLowerCase(), new PageRequest(page, size)); } }
TargetTypesServiceImpl implements TargetTypesService { @Override public Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size) { return targetTypesRepository.findAllTargetTypeDetails(searchTerm.toLowerCase(), new PageRequest(page, size)); }  }
TargetTypesServiceImpl implements TargetTypesService { @Override public Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size) { return targetTypesRepository.findAllTargetTypeDetails(searchTerm.toLowerCase(), new PageRequest(page, size)); }  @Override Collection<String> getTargetTypesNamesByDataSourceName(final String dataSourceName); @Override List<TargetTypes> getAllTargetTypesByDomainList(final List<String> domains); @Override Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size); @Override List<String> getAllTargetTypesCategories(); @Override List<TargetTypesDetails> getAllTargetTypes(List<AssetGroupTargetTypes> selectedTargetTypes); @Override List<TargetTypeAttribute> getTargetTypeAttributes(final List<TargetTypes> targetTypes); @Override Map<String, Object> getAttributeValues(AttributeValuesRequest attributeValuesRequest); @Override TargetTypes getTargetTypesByName(String targetTypeName); @Override String updateTargetTypeDetails(CreateUpdateTargetTypeDetailsRequest targetTypesDetails, final String userId); @Override String addTargetTypeDetails(final CreateUpdateTargetTypeDetailsRequest targetTypeDetailsRequest, final String userId); @Override void deleteIndex(String targetTypeIndex); }
TargetTypesServiceImpl implements TargetTypesService { @Override public Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size) { return targetTypesRepository.findAllTargetTypeDetails(searchTerm.toLowerCase(), new PageRequest(page, size)); }  @Override Collection<String> getTargetTypesNamesByDataSourceName(final String dataSourceName); @Override List<TargetTypes> getAllTargetTypesByDomainList(final List<String> domains); @Override Page<TargetTypesProjections> getAllTargetTypeDetails(String searchTerm, int page, int size); @Override List<String> getAllTargetTypesCategories(); @Override List<TargetTypesDetails> getAllTargetTypes(List<AssetGroupTargetTypes> selectedTargetTypes); @Override List<TargetTypeAttribute> getTargetTypeAttributes(final List<TargetTypes> targetTypes); @Override Map<String, Object> getAttributeValues(AttributeValuesRequest attributeValuesRequest); @Override TargetTypes getTargetTypesByName(String targetTypeName); @Override String updateTargetTypeDetails(CreateUpdateTargetTypeDetailsRequest targetTypesDetails, final String userId); @Override String addTargetTypeDetails(final CreateUpdateTargetTypeDetailsRequest targetTypeDetailsRequest, final String userId); @Override void deleteIndex(String targetTypeIndex);  }