### Question:
FileArchivedExecutionGraphStore implements ArchivedExecutionGraphStore { @Override public void put(ArchivedExecutionGraph archivedExecutionGraph) throws IOException { final JobStatus jobStatus = archivedExecutionGraph.getState(); final JobID jobId = archivedExecutionGraph.getJobID(); final String jobName = archivedExecutionGraph.getJobName(); Preconditions.checkArgument( jobStatus.isGloballyTerminalState(), "The job " + jobName + '(' + jobId + ") is not in a globally terminal state. Instead it is in state " + jobStatus + '.'); switch (jobStatus) { case FINISHED: numFinishedJobs++; break; case CANCELED: numCanceledJobs++; break; case FAILED: numFailedJobs++; break; default: throw new IllegalStateException("The job " + jobName + '(' + jobId + ") should have been in a globally terminal state. " + "Instead it was in state " + jobStatus + '.'); } storeArchivedExecutionGraph(archivedExecutionGraph); final JobDetails detailsForJob = WebMonitorUtils.createDetailsForJob(archivedExecutionGraph); jobDetailsCache.put(jobId, detailsForJob); archivedExecutionGraphCache.put(jobId, archivedExecutionGraph); } FileArchivedExecutionGraphStore(
			File rootDir,
			Time expirationTime,
			long maximumCacheSizeBytes,
			ScheduledExecutor scheduledExecutor,
			Ticker ticker); @Override int size(); @Override @Nullable ArchivedExecutionGraph get(JobID jobId); @Override void put(ArchivedExecutionGraph archivedExecutionGraph); @Override JobsOverview getStoredJobsOverview(); @Override Collection<JobDetails> getAvailableJobDetails(); @Nullable @Override JobDetails getAvailableJobDetails(JobID jobId); @Override void close();  }### Answer:
@Test public void testPut() throws IOException { final ArchivedExecutionGraph dummyExecutionGraph = new ArchivedExecutionGraphBuilder().setState(JobStatus.FINISHED).build(); final File rootDir = temporaryFolder.newFolder(); try (final FileArchivedExecutionGraphStore executionGraphStore = createDefaultExecutionGraphStore(rootDir)) { final File storageDirectory = executionGraphStore.getStorageDir(); assertThat(storageDirectory.listFiles().length, Matchers.equalTo(0)); executionGraphStore.put(dummyExecutionGraph); assertThat(storageDirectory.listFiles().length, Matchers.equalTo(1)); assertThat(executionGraphStore.get(dummyExecutionGraph.getJobID()), new PartialArchivedExecutionGraphMatcher(dummyExecutionGraph)); } }