@Test public void testshouldGetAllBoundaryByTenantIdAndTypeIds(){ when(boundaryTypeRepository.findAllByTenantIdAndName(any(String.class),any(String.class))) .thenReturn(getExpectedBoundaryTypeDetails()); List<Long> list = new ArrayList<Long>(); list.add(1l); list.add(2l); List<BoundaryType> boundaryTypeList = boundaryTypeService.getAllBoundarytypesByNameAndTenant("default","Test"); assertTrue(boundaryTypeList.size() == 2); assertFalse(boundaryTypeList.isEmpty()); assertTrue(boundaryTypeList != null); assertTrue(boundaryTypeList.get(0).getName().equals("City 1")); }
public List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId) { return boundaryTypeRepository.findAllByTenantIdAndName(tenantId, name); }
BoundaryTypeService { public List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId) { return boundaryTypeRepository.findAllByTenantIdAndName(tenantId, name); } }
BoundaryTypeService { public List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId) { return boundaryTypeRepository.findAllByTenantIdAndName(tenantId, name); }  }
BoundaryTypeService { public List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId) { return boundaryTypeRepository.findAllByTenantIdAndName(tenantId, name); }  BoundaryType createBoundaryType(BoundaryType boundaryType); BoundaryType findByIdAndTenantId(Long id, String tenantId); BoundaryType updateBoundaryType(final BoundaryType boundaryType); List<BoundaryType> getAllBoundarTypesByHierarchyTypeIdAndTenantName(final String hierarchyTypeName,
			final String tenantId); BoundaryType setHierarchyLevel(final BoundaryType boundaryType, final String mode); BoundaryType getBoundaryTypeByNameAndHierarchyTypeName(final String boundaryTypename,
			final String hierarchyTypeName, String tenantId); BoundaryType findByTenantIdAndCode(String tenantId, String code); List<BoundaryType> getAllBoundaryTypes(BoundaryTypeRequest boundaryTypeRequest); List<BoundaryType> getAllBoundaryTypes(BoundaryTypeSearchRequest boundarytypeRequest); List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId); }
BoundaryTypeService { public List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId) { return boundaryTypeRepository.findAllByTenantIdAndName(tenantId, name); }  BoundaryType createBoundaryType(BoundaryType boundaryType); BoundaryType findByIdAndTenantId(Long id, String tenantId); BoundaryType updateBoundaryType(final BoundaryType boundaryType); List<BoundaryType> getAllBoundarTypesByHierarchyTypeIdAndTenantName(final String hierarchyTypeName,
			final String tenantId); BoundaryType setHierarchyLevel(final BoundaryType boundaryType, final String mode); BoundaryType getBoundaryTypeByNameAndHierarchyTypeName(final String boundaryTypename,
			final String hierarchyTypeName, String tenantId); BoundaryType findByTenantIdAndCode(String tenantId, String code); List<BoundaryType> getAllBoundaryTypes(BoundaryTypeRequest boundaryTypeRequest); List<BoundaryType> getAllBoundaryTypes(BoundaryTypeSearchRequest boundarytypeRequest); List<BoundaryType> getAllBoundarytypesByNameAndTenant(String name, String tenantId);  }