### Question:
FileSystemFlowPersistenceProvider implements FlowPersistenceProvider { @Override public synchronized byte[] getFlowContent(final String bucketId, final String flowId, final int version) throws FlowPersistenceException { final File snapshotFile = getSnapshotFile(bucketId, flowId, version); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Retrieving snapshot with filename {}", new Object[] {snapshotFile.getAbsolutePath()}); } if (!snapshotFile.exists()) { return null; } try (final InputStream in = new FileInputStream(snapshotFile)){ return IOUtils.toByteArray(in); } catch (IOException e) { throw new FlowPersistenceException("Error reading snapshot file: " + snapshotFile.getAbsolutePath(), e); } }  @Override void onConfigured(final ProviderConfigurationContext configurationContext); @Override synchronized void saveFlowContent(final FlowSnapshotContext context, final byte[] content); @Override synchronized byte[] getFlowContent(final String bucketId, final String flowId, final int version); @Override synchronized void deleteAllFlowContent(final String bucketId, final String flowId); @Override synchronized void deleteFlowContent(final String bucketId, final String flowId, final int version);  }### Answer:
@Test public void testSaveAndGet() throws IOException { createAndSaveSnapshot(fileSystemFlowProvider,"bucket1", "flow1", 1, "flow1v1"); createAndSaveSnapshot(fileSystemFlowProvider,"bucket1", "flow1", 2, "flow1v2"); final byte[] flow1v1 = fileSystemFlowProvider.getFlowContent("bucket1", "flow1", 1); Assert.assertEquals("flow1v1", new String(flow1v1, StandardCharsets.UTF_8)); final byte[] flow1v2 = fileSystemFlowProvider.getFlowContent("bucket1", "flow1", 2); Assert.assertEquals("flow1v2", new String(flow1v2, StandardCharsets.UTF_8)); }
@Test public void testGetWhenDoesNotExist() { final byte[] flow1v1 = fileSystemFlowProvider.getFlowContent("bucket1", "flow1", 1); Assert.assertNull(flow1v1); }