### Question:
SearchCoordinatorSvcImpl implements ISearchCoordinatorSvc { @SuppressWarnings("WeakerAccess") public static @Nullable Pageable toPage(final int theFromIndex, int theToIndex) { int pageSize = theToIndex - theFromIndex; if (pageSize < 1) { return null; } int pageIndex = theFromIndex / pageSize; Pageable page = new AbstractPageRequest(pageIndex, pageSize) { private static final long serialVersionUID = 1L; @Override public long getOffset() { return theFromIndex; } @Override public Sort getSort() { return Sort.unsorted(); } @Override public Pageable next() { return null; } @Override public Pageable previous() { return null; } @Override public Pageable first() { return null; } }; return page; } @Autowired  SearchCoordinatorSvcImpl(ThreadPoolTaskExecutor searchCoordinatorThreadFactory); @VisibleForTesting void setSearchCacheServicesForUnitTest(ISearchCacheSvc theSearchCacheSvc, ISearchResultCacheSvc theSearchResultCacheSvc); @PostConstruct void start(); @Override void cancelAllActiveSearches(); @Override @Transactional(propagation = Propagation.NEVER) List<ResourcePersistentId> getResources(final String theUuid, int theFrom, int theTo, @Nullable RequestDetails theRequestDetails); @Override IBundleProvider registerSearch(final IFhirResourceDao<?> theCallingDao, final SearchParameterMap theParams, String theResourceType, CacheControlDirective theCacheControlDirective, RequestDetails theRequestDetails); @Override Optional<Integer> getSearchTotal(String theUuid); @VisibleForTesting void setLoadingThrottleForUnitTests(Integer theLoadingThrottleForUnitTests); @VisibleForTesting void setNeverUseLocalSearchForUnitTests(boolean theNeverUseLocalSearchForUnitTests); @VisibleForTesting void setSyncSizeForUnitTests(int theSyncSize); @VisibleForTesting void setSearchBuilderFactoryForUnitTest(SearchBuilderFactory theSearchBuilderFactory); @VisibleForTesting void setPersistedJpaBundleProviderFactoryForUnitTest(PersistedJpaBundleProviderFactory thePersistedJpaBundleProviderFactory); @VisibleForTesting void setRequestPartitionHelperService(IRequestPartitionHelperSvc theRequestPartitionHelperService); static void populateSearchEntity(SearchParameterMap theParams, String theResourceType, String theSearchUuid, String theQueryString, Search theSearch); @SuppressWarnings("WeakerAccess") static @Nullable Pageable toPage(final int theFromIndex, int theToIndex); static final int DEFAULT_SYNC_SIZE; static final String UNIT_TEST_CAPTURE_STACK; static final Integer INTEGER_0; }### Answer:
@Test public void testGetPage() { Pageable page = SearchCoordinatorSvcImpl.toPage(50, 73); assert page != null; assertEquals(50, page.getOffset()); assertEquals(23, page.getPageSize()); }