### Question:
FsCheckpointStorage extends AbstractFsCheckpointStorage { @Override public CheckpointStreamFactory resolveCheckpointStorageLocation( long checkpointId, CheckpointStorageLocationReference reference) throws IOException { if (reference.isDefaultReference()) { final Path checkpointDir = createCheckpointDirectory(checkpointsDirectory, checkpointId); return new FsCheckpointStorageLocation( fileSystem, checkpointDir, sharedStateDirectory, taskOwnedStateDirectory, reference, fileSizeThreshold, writeBufferSize); } else { final Path path = decodePathFromReference(reference); return new FsCheckpointStorageLocation( path.getFileSystem(), path, path, path, reference, fileSizeThreshold, writeBufferSize); } } FsCheckpointStorage(
			Path checkpointBaseDirectory,
			@Nullable Path defaultSavepointDirectory,
			JobID jobId,
			int fileSizeThreshold,
			int writeBufferSize);  FsCheckpointStorage(
			FileSystem fs,
			Path checkpointBaseDirectory,
			@Nullable Path defaultSavepointDirectory,
			JobID jobId,
			int fileSizeThreshold,
			int writeBufferSize); Path getCheckpointsDirectory(); @Override boolean supportsHighlyAvailableStorage(); @Override CheckpointStorageLocation initializeLocationForCheckpoint(long checkpointId); @Override CheckpointStreamFactory resolveCheckpointStorageLocation(
			long checkpointId,
			CheckpointStorageLocationReference reference); @Override CheckpointStateOutputStream createTaskOwnedStateStream();  }### Answer:
@Test public void testResolveCheckpointStorageLocation() throws Exception { final FileSystem checkpointFileSystem = mock(FileSystem.class); final FsCheckpointStorage storage = new FsCheckpointStorage( new TestingPath("hdfs: null, new JobID(), FILE_SIZE_THRESHOLD, WRITE_BUFFER_SIZE); final FsCheckpointStorageLocation checkpointStreamFactory = (FsCheckpointStorageLocation) storage.resolveCheckpointStorageLocation(1L, CheckpointStorageLocationReference.getDefault()); assertEquals(checkpointFileSystem, checkpointStreamFactory.getFileSystem()); final CheckpointStorageLocationReference savepointLocationReference = AbstractFsCheckpointStorage.encodePathAsReference(new Path("file: final FsCheckpointStorageLocation savepointStreamFactory = (FsCheckpointStorageLocation) storage.resolveCheckpointStorageLocation(2L, savepointLocationReference); final FileSystem fileSystem = savepointStreamFactory.getFileSystem(); assertTrue(fileSystem instanceof LocalFileSystem); }