public Optional<T> get(int subpartitionId, int bufferIndex) {
        // first of all, try to get region in memory.
        Optional<T> regionOpt =
                getCachedRegionContainsTargetBufferIndex(subpartitionId, bufferIndex);
        if (regionOpt.isPresent()) {
            T region = regionOpt.get();
            checkNotNull(
                    // this is needed for cache entry remove algorithm like LRU.
                    internalCache.getIfPresent(
                            new CachedRegionKey(subpartitionId, region.getFirstBufferIndex())));
            return Optional.of(region);
        } else {
            // try to find target region and load it into cache if founded.
            spilledRegionManager.findRegion(subpartitionId, bufferIndex, true);
            return getCachedRegionContainsTargetBufferIndex(subpartitionId, bufferIndex);
        }
    }
@Test
    void testGetNonExistentRegion() {
        Optional<TestingFileDataIndexRegion> region = indexCache.get(0, 0);
        // get a non-existent region.
        assertThat(region).isNotPresent();
    }